[Biojava-dev] BioJava + Oracle BioSQL
Michael Griffith
mg at base-pair.com
Thu Aug 5 16:23:10 EDT 2004
Hi,
I am able to get the latest BioJava 1.4 release to work with the BioSQL
schema on MySQL, but I am having problems with setting up the oracle
version.
I have downloaded and installed the BS-create-Biosql-API2.sql file posted a
week ago by Hilmar Lapp. Hilmar also informed me that there was a table
missing -- which I believe is the term_relationship_term table. This table
was also missing from the mySQL schema.
I've recreated the DB with this table, and the new improved API/views.
However when I am trying to load a Genebank record into the database, I get
the following exception stack:
[java] org.biojava.bio.BioRuntimeException: Error adding sequence: AA000001
(rolled back successfully)
[java] at
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequenceDB
.java:498)
{java] at
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.addSequence(BioSQLSequenceDB.
java:365)
[java] at com.gts.genebank.GeneralReader.main(GeneralReader.java:74)
[java] Caused by: java.sql.SQLException: ORA-02290: check constraint
(BIOSQL_APP.ALPHABET4) violated
[java] at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
[java] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
My code is simply doing the following:
SequenceDB db = new BioSQLSequenceDB(dbDriver, dbURL, dbUser, dbPass,
biodatabase, create);
SequenceIterator iter =
(SequenceIterator)SeqIOTools.fileToBiojava(format, alpha, br);
while (iter.hasNext()) {
Sequence seq = iter.nextSequence();
try {
db.addSequence(seq);
} catch (Exception e) {
e.printStackTrace();
}
}
This code works successfully against the mySQL version of the current biosql
schema. Although there was a problem with the term.name field and case
sensitivity in that version as well. In order to get that to work, the field
had to be marked as binary. I am wondering if I am running into a similar
problem here?
Any help would be greatly appreciated!
Cheers!
Michael Griffith
More information about the biojava-dev
mailing list