[Biojava-dev] MORE Oracle BioSQL & BioJava problems

Michael Griffith mg at base-pair.com
Mon Aug 9 12:03:21 EDT 2004


Hi, 

I have been trying to get the latest BioSQL (Oracle) and BioJava to play
nicely -- and I feel that I am close, but I am still getting errors.  I am
trying to read a GenBank file to the Oracle BioSQL schema with the following
code:

SequenceDB db = new BioSQLSequenceDB(dbDriver, dbURL, dbUser, dbPass
biodatabase, create);

    SequenceIterator iter =
            (SequenceIterator)SeqIOTools.fileToBiojava(format, alpha, br);
   int counter= 0;

    while (iter.hasNext()) {

        Sequence seq = iter.nextSequence();

        try {
            db.addSequence(seq);
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        ...
    }

This code works perfectly well with the mySQL version of the bio-sql schema,
however with the oracle version, I get the following SQLException stack.

The loop loads about 65 of the first 70 records, and hangs on record #71,
every time.  What is puzzling, is I have never had any sort of these kinds
of errors with any other Java/Oracle application.

 [java] org.biojava.bio.BioRuntimeException: Error adding sequence:
NM_019764
     [java]     at 
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB._addSequence(BioSQLSequenceDB
.java:498)
     [java] Trying to add: NM_021274 to the database -- insert attemp #:71
     [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: No more data to read from
socket
     [java]     at 
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
     [java]     at 
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
     [java]     at 
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
     [java]     at 
oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
     [java]     at 
oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
     [java]     at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:369)
     [java]     at 
oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
     [java]     at 
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
     [java]     at 
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047
)
     [java]     at 
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
     [java]     at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:2709)
     [java]     at 
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
ment.java:589)
     [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.BioSQLSequenceDB._addSequence(BioSQLSequenceDB
.java:455)
     [java]     ... 2 more

Any help would be greatly appreciated!

Cheers!

MG



More information about the biojava-dev mailing list