[Biojava-l] Parsing Genbank-sequences from NCBI

Felix Dreher dreher at mpiib-berlin.mpg.de
Thu Jul 13 18:46:00 UTC 2006


Hello,

I have a problem with the parsing of Genbank-Sequences from NCBI.

The probably most important line of the log (see below) is the following:
Error while trying to call new class org.biojavax.SimpleDocRef(class 
java.util.ArrayList,class java.lang.String,class java.lang.String)

This exception is thrown when I run the following code (with the latest 
CVS version):

        GenbankRichSequenceDB  ncbi = new GenbankRichSequenceDB();
        ncbi.setNamespace(RNAiDBFactory.getTargetDBNamespace());
        RichSequence rs = ncbi.getRichSequence("110002612");


If I use the CVS version of March 2006, a different exception is thrown. 
This is said to be fixed
(Re: [Biojava-l] Parsing Genbank/EMBL/XML Sequences from binary NCBI 
ASN.1 daily update files
 Richard Holland
Fri, 02 Jun 2006 02:16:07 -0700)



Any help would be highly appreciated!
Best regards,
Felix



current exception:

2006-07-13 20:28:04,446 ERROR [main]
Error:
org.biojava.bio.BioException: Failed to read Genbank sequence
    at 
org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:157)
    at rnaiserver.calculation.TestRun.downloadSequences(TestRun.java:237)
    at rnaiserver.calculation.TestRun.main(TestRun.java:40)
Caused by: org.biojava.bio.BioException: Could not read sequence
    at 
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:112)
    at 
org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:153)
    ... 2 more
Caused by: java.lang.RuntimeException: Error while trying to call new 
class org.biojavax.SimpleDocRef(class java.util.ArrayList,class 
java.lang.String,class java.lang.String)
    at 
org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:156)
    at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:104)
    at 
org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(GenbankFormat.java:385)
    at 
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:109)
    ... 3 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at 
org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:123)
    ... 6 more
Caused by: org.hibernate.exception.GenericJDBCException: could not 
execute query
    at 
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
    at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
    at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:2148)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
    at 
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
    at 
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1129)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    at 
org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
    ... 11 more
Caused by: org.postgresql.util.PSQLException: ERROR: current transaction 
is aborted, commands ignored until end of transaction block
    at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
    at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
    at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:437)
    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:257)
    at 
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
    at org.hibernate.loader.Loader.doQuery(Loader.java:662)
    at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.doList(Loader.java:2145)
    ... 19 more






'old' exception with Biojava-live from March 2006:

2006-07-13 20:22:08,425 ERROR [main]
Error:
org.biojava.bio.BioException: Failed to read Genbank sequence
    at 
org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:156)
    at rnaiserver.calculation.TestRun.downloadSequences(TestRun.java:237)
    at rnaiserver.calculation.TestRun.main(TestRun.java:40)
Caused by: org.biojava.bio.BioException: Could not read sequence
    at 
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:111)
    at 
org.biojavax.bio.db.ncbi.GenbankRichSequenceDB.getRichSequence(GenbankRichSequenceDB.java:152)
    ... 2 more
Caused by: java.lang.IllegalArgumentException: Authors string cannot be null
    at 
org.biojavax.DocRefAuthor$Tools.parseAuthorString(DocRefAuthor.java:75)
    at 
org.biojavax.bio.seq.io.GenbankFormat.readRichSequence(GenbankFormat.java:323)
    at 
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:108)
    ... 3 more



More information about the Biojava-l mailing list