[Biojava-dev] problems with biosql

Simon Foote simon.foote at nrc-cnrc.gc.ca
Wed Sep 24 14:03:26 EDT 2003


Hi Mathew,

Which database server are you using?
I ran into a similar problem importing Genbank files into a MySQL 
database as Genbank can contain terms that are the same, but have 
different cases.  Off the top of my head, I traced this to either the 
unique indexing of the term table in the database doesn't take the case 
into account or the persistant storage of the terms in a map doesn't 
take the case into account.  Although, I can't remember whether the keys 
in a map take case into account.

There is a comment line in BioSQLSequenceDB.java around line 850
//System.err.println("Term: " + ts + "   " + ex.getMessage());
That will give you the offending term if uncommented.

The hack I added above that code block worked in all my Genbank cases, 
but I never did test it with EMBL files.

It maybe time to think about removing this legacy ontology code and 
using whatever is supposed to replace it.
I think Thomas coded the original stuff.

Simon

-- 
Bioinformatics Programmer
Institute for Biological Sciences
National Research Council of Canada
[T] 613-990-0561  [F] 613-952-9092
simon.foote at nrc-cnrc.gc.ca



Matthew Pocock wrote:

>And here's another stack-trace we get after getting the SQLException to use
>initCause() - it's a monster trace :) Apparently, part of the code things
>that a term needs adding to the database, but another part thinks it already
>exists. At least that's the best I can figure from the undocumented code &
>exceptions that don't say very much. Sorry - long day.
>
>Matthew
>
>org.biojava.bio.BioRuntimeException: Error adding BioSQL tables (rolled
>back successfully)
>        at
>org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequen
>ceDB.java:464)
>        at
>org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.addSequence(BioSQLSequenc
>eDB.java:315)
>        at mbsample.EmblBase.main(EmblBase.java:68)
>Caused by: java.sql.SQLException: Couldn't create term in legacy
>ontology namespace
>        at
>org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.intern_ontology_term(BioS
>QLSequenceDB.java:903)
>        at
>org.biojava.bio.seq.db.biosql.FeaturesSQL.persistProperty(FeaturesSQL.ja
>va:1016)
>        at
>org.biojava.bio.seq.db.biosql.FeaturesSQL.persistFeature(FeaturesSQL.jav
>a:880)
>        at
>org.biojava.bio.seq.db.biosql.FeaturesSQL.persistFeatures(FeaturesSQL.ja
>va:739)
>        at
>org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequen
>ceDB.java:434)
>        ... 2 more
>Caused by: org.biojava.bio.BioRuntimeException: Error removing from
>BioSQL tables (rolled back successfully)
>        at
>org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:4
>49)
>        at
>org.biojava.bio.seq.db.biosql.OntologySQL.access$200(OntologySQL.java:58
>)
>        at
>org.biojava.bio.seq.db.biosql.OntologySQL$OntologyMonitor.postChange(Ont
>ologySQL.java:416)
>        at
>org.biojava.utils.ChangeSupport.firePostChangeEvent(ChangeSupport.java:3
>02)
>        at org.biojava.ontology.Ontology$Impl.addTerm(Ontology.java:312)
>        at
>org.biojava.ontology.Ontology$Impl.createTerm(Ontology.java:321)
>        at
>org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.intern_ontology_term(BioS
>QLSequenceDB.java:899)
>        ... 6 more
>Caused by: java.sql.SQLException: ERROR:  current transaction is
>aborted, queries ignored until end of transaction block
>
>        at
>org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
>        at
>org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connec
>tion.java:505)
>        at
>org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Stateme
>nt.java:320)
>        at
>org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme
>nt.java:48)
>        at
>org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1S
>tatement.java:197)
>        at
>org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:4
>64)
>        at
>org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:4
>37)
>        ... 12 more
>
>
>_______________________________________________
>biojava-dev mailing list
>biojava-dev at biojava.org
>http://biojava.org/mailman/listinfo/biojava-dev
>  
>




More information about the biojava-dev mailing list