[Biojava-dev] BioJava Nightly Build + BioSQL/MySQL problem...

Michael Griffith mg at base-pair.com
Tue Aug 3 13:42:28 EDT 2004


Thomas, 

Thanks for the reply. Since the original post, I tried the older schema, but
of course it didn't work. I got this message: org.biojava.bio.BioException:
This database appears to be an old (pre-Singapore) BioSQL. If you need to
access it, try an older BioJava snapshot (1.3pre1 or earlier).

So I recreated the schema with the latest from CVS, version 1.38 and tried
to re-run my load.  It failed in the same spot with the same error stack.

Any help is GREATLY appreciated!

Cheers!

MG

Here is the contents of my term table:

  1   triple     (null)   (null)   1
  2   any     (null)   (null)   1
  3   has-a     (null)   (null)   1
  4   has-a(triple, any)     (null)   (null)   1
  5   3     (null)   (null)   1
  6   size     (null)   (null)   1
  7   size(has-a(triple, any), 3)     (null)   (null)   1
  8   injective     (null)   (null)   1
  9   relation     (null)   (null)   1
  10   is-a     (null)   (null)   1
  11   is-a(injective, relation)     (null)   (null)   1
  12   source     (null)   (null)   1
  13   symmetric     (null)   (null)   1
  14   is-a(symmetric, relation)     (null)   (null)   1
  15   is-a(triple, any)     (null)   (null)   1
  16   partial-order     (null)   (null)   1
  17   is-a(is-a, partial-order)     (null)   (null)   1
  18   is-a(is-a, relation)     (null)   (null)   1
  19   anti-symmetric     (null)   (null)   1
  20   is-a(partial-order, anti-symmetric)     (null)   (null)   1
  21   aTriple     (null)   (null)   1
  22   remote-term     (null)   (null)   1
  23   disjoint     (null)   (null)   1
  24   inverse     (null)   (null)   1
  25   remoteTerm     (null)   (null)   1
  26   equivalence     (null)   (null)   1
  27   transitive     (null)   (null)   1
  28   is-a(transitive, relation)     (null)   (null)   1
  29   1     (null)   (null)   1
  30   is-a(partial-order, any)     (null)   (null)   1
  31   is-a(has-a, relation)     (null)   (null)   1
  32   reflexive     (null)   (null)   1
  33   none     (null)   (null)   1
  34   disjoint(none, any)     (null)   (null)   1
  35   is-a(any, any)     (null)   (null)   1
  36   positive-integer     (null)   (null)   1
  37   is-a(equivalence, transitive)     (null)   (null)   1
  38   is-a(disjoint, relation)     (null)   (null)   1
  39   has-a(triple, source)     (null)   (null)   1
  40   is-a(relation, any)     (null)   (null)   1
  41   object     (null)   (null)   1
  42   has-a(triple, object)     (null)   (null)   1
  43   has-a(relation, size)     (null)   (null)   1
  44   is-a(aTriple, has-a)     (null)   (null)   1
  45   identity     (null)   (null)   1
  46   is-a(identity, equivalence)     (null)   (null)   1
  47   size(is-a(partial-order, any), 3)     (null)   (null)   1
  48   has-a(triple, relation)     (null)   (null)   1
  49   remoteTerm(remote-term, any)     (null)   (null)   1
  50   size(remoteTerm(remote-term, any), 1)     (null)   (null)   1
  51   is-a(reflexive, relation)     (null)   (null)   1
  52   is-a(equivalence, symmetric)     (null)   (null)   1
  53   is-a(equivalence, any)     (null)   (null)   1
  54   is-a(remote-term, any)     (null)   (null)   1
  55   triple-term     (null)   (null)   1
  56   is-a(equivalence, reflexive)     (null)   (null)   1
  57   is-a(remoteTerm, has-a)     (null)   (null)   1
  58   size(is-a(equivalence, any), 3)     (null)   (null)   1
  59   is-a(partial-order, reflexive)     (null)   (null)   1
  60   is-a(partial-order, transitive)     (null)   (null)   1
  61   aTriple(triple-term, triple)     (null)   (null)   1
  62   size(aTriple(triple-term, triple), 1)     (null)   (null)   1
  63   is-a(triple-term, any)     (null)   (null)   1
  64   part-of     (null)   (null)   1
  65   inverse(part-of, has-a)     (null)   (null)   1
  66   is-a(size, positive-integer)     (null)   (null)   1
  67   source     (null)   (null)   2
  68   GenBank     (null)   (null)   2
  69   sex     (null)   (null)   2
  70   dev_stage     (null)   (null)   2
  71   organism     (null)   (null)   2
  72   db_xref     (null)   (null)   2
  73   lab_host     (null)   (null)   2
  74   mol_type     (null)   (null)   2
  75   clone     (null)   (null)   2
  76   note     (null)   (null)   2
  77   clone_lib     (null)   (null)   2
  78   TYPE     (null)   (null)   2
  79   ACCESSION     (null)   (null)   2
  80   genbank_accessions     (null)   (null)   2
  81   tissue_type     (null)   (null)   2
  82   strain     (null)   (null)   2
  83   KEYWORDS     (null)   (null)   2

Here is the stack trace:

     [java] *** Importing a core ontology -- hope this is okay
     [java] *** Importing terms
     [java] /*--------------------------------------*/
     [java] Trying to add: AA000001 to the database
     [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] /*--------------------------------------*/
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.addSequence(BioSQLSequenceDB.
java:365)
     [java]     at 
com.gts.genebank.GeneralReader.main(GeneralReader.java:66)
     [java] /*--------------------------------------*/
     [java] Trying to add: AA000002 to the database
     [java] Caused by: java.sql.SQLException: Couldn't create term
'ORGANISM' for 'ORGANISM' in legacy ontology namespace
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.intern_ontology_term(BioSQLSe
quenceDB.java:942)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.persistBioentryProperty(BioSQ
LSequenceDB.java:894)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequenceDB
.java:485)
     [java]     ... 2 more
     [java] Caused by: org.biojava.bio.BioRuntimeException: Error commiting
to BioSQL tables (rolled back successfully)
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:536)
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.access$200(OntologySQL.java:61)
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL$OntologyMonitor.postChange(Ontolog
ySQL.java:503)
     [java]     at 
org.biojava.utils.ChangeSupport.firePostChangeEvent(ChangeSupport.java:338)
     [java]     at 
org.biojava.ontology.Ontology$Impl.addTerm(Ontology.java:349)
     [java]     at 
org.biojava.ontology.Ontology$Impl.createTerm(Ontology.java:358)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.intern_ontology_term(BioSQLSe
quenceDB.java:938)
     [java]     ... 4 more
     [java] Caused by: java.sql.SQLException: Failed to persist term:
ORGANISM from ontology: ontology: __biojava_guano with error: 1062 : 23000
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:562)
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:524)
     [java]     ... 10 more
     [java] Caused by: java.sql.SQLException: Duplicate key or integrity
constraint violation,  message from server: "Duplicate entry 'ORGANISM-2'
for key 2"
     [java]     at 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977)
     [java]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
     [java]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
     [java]     at com.mysql.jdbc.Connection.execSQL(Connection.java:2236)
     [java]     at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
     [java]     at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1588)
     [java]     at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating
PreparedStatement.java:233)
     [java]     at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating
PreparedStatement.java:233)
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.persistTerm(OntologySQL.java:554)
     [java]     ... 11 more
     [java] Exception in thread "main" org.biojava.bio.BioError: Error
looking up biosqlized ID for ORGANISM
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.termID(OntologySQL.java:684)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.intern_ontology_term(BioSQLSe
quenceDB.java:927)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.persistBioentryProperty(BioSQ
LSequenceDB.java:894)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequenceDB
.java:485)
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.addSequence(BioSQLSequenceDB.
java:365)
     [java]     at 
com.gts.genebank.GeneralReader.main(GeneralReader.java:66)
     [java] Caused by: java.lang.NullPointerException
     [java]     at 
org.biojava.bio.seq.db.biosql.OntologySQL.termID(OntologySQL.java:682)
     [java]     ... 5 more
     [java] Java Result: 1





On 8/3/04 12:37 PM, "Thomas Down" <td2 at sanger.ac.uk> wrote:

> 
> On 3 Aug 2004, at 18:20, Michael Griffith wrote:
> 
>> Michael,
>> 
>> Well, that could be the problem?  I don't have a table called
>> ontology_term.
>> I do have a table called ontology that looks like this:
>> 
>>   4   __core_ontology   BioSQL core ontology (imported by BioJava)
>>   5   __biojava_guano   Namespace for old, but still useful, shit
>> imported
>> from ontology-less BioJava data models
>> 
>> The version of my schema was created from:
>> biosql-schema/sql/biosqldb-mysql.sql Version 1.38.  Is this correct?
> 
> The table formerly known as ontology_term is now just called "term" --
> could you take a look at that?
> 
>     Thomas.
> 
> 



More information about the biojava-dev mailing list