Joined: Fri May 27, 2005 10:45 am Posts: 6
|
Hi,
I'm using in-memory HSQLDB for my unit tests. All my tests are ok using hibernate 3.0.5 and HSQLDB 1.7.2 or 1.8.0.
I tried Hibernate 3.1rc1 (and beta3 before). Nothing is changed except the hibernate library. All my tests fail with the following exception:
java.util.NoSuchElementException
at org.hsqldb.lib.IntValueHashMap.get(Unknown Source)
at org.hsqldb.CompiledStatementManager.getStatementID(Unknown Source)
at org.hsqldb.Session.sqlPrepare(Unknown Source)
at org.hsqldb.Session.execute(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:431)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
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:223)
at org.hibernate.loader.Loader.doList(Loader.java:2147)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
at org.hibernate.loader.Loader.list(Loader.java:2021)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:109)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1547)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:165)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:650)
at com.db.eps.common.entitlement.service.authorization.impl.HibernateAuthorizationImpl$1.executeIn(HibernateAuthorizationImpl.java:115)
at com.db.eps.common.persistence.hibernate.support.AbstractHibernateDAO.process(AbstractHibernateDAO.java:44)
at com.db.eps.common.entitlement.service.authorization.impl.HibernateAuthorizationImpl.isAuthorizedForDirectGroupMembership(HibernateAuthorizationImpl.java:103)
at com.db.eps.common.entitlement.service.authorization.impl.HibernateAuthorizationImpl.isAuthorized(HibernateAuthorizationImpl.java:77)
at com.db.eps.common.entitlement.service.authorization.impl.TestAuthorization.testAuthorizationIsNotGrantedIfUserDoesNotHaveACL(TestAuthorization.java:87)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Here is config for HSQLDB
<property name="connection.username">sa</property>
<property name="connection.url">jdbc:hsqldb:mem:testdb</property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</property>
The hibernate generated for each test is:
Hibernate: null
Any idea ?
Thanks
Patrick
|
|