[Biojava-dev] biojavax stress test
mark.schreiber at novartis.com
mark.schreiber at novartis.com
Thu Jan 12 20:19:49 EST 2006
Fixed in CVS
Michael Heuer <heuermh at acm.org>
Sent by: biojava-dev-bounces at portal.open-bio.org
01/13/2006 07:19 AM
To: biojava-dev at biojava.org
cc: (bcc: Mark Schreiber/GP/Novartis)
Subject: Re: [Biojava-dev] biojavax stress test
Thanks Mark,
I got it working, up to a point now:
org.biojava.bio.BioException: Could not read sequence
at
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:103)
at
org.biojavax.example.Example.loadFastaSequence(Example.java:226)
at org.biojavax.example.Example.run(Example.java:76)
at org.biojavax.example.Example.main(Example.java:320)
Caused by: java.lang.RuntimeException: Error while trying to call new
class org.biojavax.SimpleNamespace(class java.lang.String)
at
org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:154)
at
org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:95)
at
org.biojavax.RichObjectFactory.getDefaultNamespace(RichObjectFactory.java:160)
at
org.biojavax.bio.seq.io.FastaFormat.readRichSequence(FastaFormat.java:137)
at
org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:100)
... 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.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:121)
... 7 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute
query
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2153)
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:369)
at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
... 12 more
Caused by: java.sql.SQLException: Column not found: NAMESPACE0_.ACRONYM in
statement [select namespace0_.biodatabase_id as biodatab1_16_,
namespace0_.name as name16_, namespace0_.authority as authority16_,
namespace0_.description as descript4_16_, namespace0_.acronym as
acronym16_, namespace0_.uri as uri16_ from biodatabase namespace0_ where
namespace0_.name=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
... 19 more
Following the mappings, namespace --> biodatabase table, but there is no
acronym column in either the hsql or mysql versions of the DDL. Should I
just remove that column mapping, or add the column to the DDL?
The oracle biosql DDL also has an URI column (mapped to URIString) that is
missing from the hsql and mysql versions.
michael
On Thu, 12 Jan 2006 mark.schreiber at novartis.com wrote:
> Hi Michael -
>
> Everything that can be configured with the Hibernate config.xml can be
> configured programatically with the hibernate API (or even XDoclet
> apparently!!).
>
> The best guide is the Hibernate reference
> (http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-programmatic)
> which has examples.
>
> A HSQL Junit test for the hibernate mappings would be excellent!
>
> - Mark
>
>
>
>
>
> Michael Heuer <heuermh at acm.org>
> Sent by: biojava-dev-bounces at portal.open-bio.org
> 01/12/2006 12:52 PM
>
>
> To: biojava-dev at biojava.org
> cc: (bcc: Mark Schreiber/GP/Novartis)
> Subject: [Biojava-dev] biojavax stress test
>
>
> Mark Schreiber wrote:
>
> > Right now we need people to stress test the new biojavax packages
> > available in CVS. Some more Unit tests for biojavax would also be
great.
> > Especially ones that test for cases identified in stress testing.
>
> Hello Mark,
>
> Along these lines I tried to put together a functional test setup for
the
> biojavax packages, but ran into a bit of a problem. I'd like to:
>
> - create an in-memory database and connection using HSQLDB
>
> - load the biosql DDL into the in-memory database using straight jdbc
>
> - load the hibernate mappings and create a hibernate session
>
> - load the taxon files into the database, using hibernate
>
> - load a handful of sequences from flat files into the database
>
> - run tests on the sequences pulled from the database (or the cache, as
> it may be)
>
> Unfortunately I'm stuck at the hibernate config part -- does anyone know
> how to load the mappings and create a session from an existing
Connection?
>
> The Hibernate config works fine from a config file and an external
> database, but I would really like to do everything in code, so that it
> can be used in a set up method for tests.
>
> michael
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>
>
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>
_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev
More information about the biojava-dev
mailing list