-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: CaveatEmptor with mysql 4.1
PostPosted: Fri Jan 06, 2006 5:25 am 
Newbie

Joined: Sat Oct 22, 2005 1:51 am
Posts: 3
The readme of CaveatEmptor says that "Note: The unit tests will not work on a MySQL database without support for SQL subselects!". MySQL 4.1 already support subselect. Does that mean we can directly test the current CAveatEmptor with mysql 4.1 now??

Thanks for the answer

---

I use caveatemptor.HiA-SE-3.1alpha5.zip with hsql and it works perfectly. But I change to use mysql 4.1.13 by changing the following setting in hibernate.cfg.xml and it does not work.

Code:
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="connection.url">jdbc:mysql://localhost:3307/caveatemptor</property>
        <property name="connection.username">root</property>
        <property name="connection.password">xxx</property>


The junit task returns such errors.

Code:
[junit] Running org.hibernate.ce.auction.test.junit.AllHibernateTests
[junit] Tests run: 11, Failures: 0, Errors: 10, Time elapsed: 101,796 sec


I use mysql-connector-java-3.1.10-bin.jar as driver.

The detailed error messages are as following.

Code:
09:26:18,951 DEBUG IntegerType:79 - binding '1' to parameter: 13
09:26:18,951 ERROR AbstractFlushingEventListener:299 - Could not synchronize database state with session
org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:33)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2203)
   at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2117)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2373)
   at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   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.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
   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 junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
------------- ---------------- ---------------

Testcase: testBillingDetails took 31,635 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#1]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#1]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testItemData took 0,671 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#5]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#5]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testPlaceBid took 0,741 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#9]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#9]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testCompositeQuery took 0,771 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#13]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#13]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testFindByCompositeId took 0,691 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#17]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#17]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testDeletionFromItem took 0,721 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#21]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#21]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testCategorizedItemOrphansDeletion took 0,691 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#25]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#25]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testAuditLog took 42,862 sec
Testcase: testTreeCreation took 21,581 sec
   Caused an ERROR
could not execute update query
org.hibernate.exception.GenericJDBCException: could not execute update 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.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:84)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:326)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:198)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1031)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.hibernate.ce.auction.persistence.NestedSetInterceptor.postFlush(Unknown Source)
   at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:347)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.NestedSetTest.testTreeCreation(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.NestedSetTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 1 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
   ... 34 more

Testcase: testShipmentCreation took 0,671 sec
   Caused an ERROR
could not insert collection: [org.hibernate.ce.auction.model.Item.images#1]
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#1]
   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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
   at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
   at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:992)
   at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:670)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1159)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1076)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1061)
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
   at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
   ... 27 more

Testcase: testShipmentCreationForAuction took 0,741 sec
   Caused an ERROR
Unexpected row count: 0 expected: 1
org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
   at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:33)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2203)
   at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2117)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2373)
   at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
   at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
   at $Proxy0.flush(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(Unknown Source)
   at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(Unknown Source)




Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 3:57 am 
Newbie

Joined: Wed Jan 18, 2006 3:39 am
Posts: 1
15:55:27,209 ERROR JDBCExceptionReporter:72 - Statement parameter 2 not set.
15:55:27,209 ERROR AbstractFlushingEventListener:299 - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert collection: [org.hibernate.ce.auction.model.Item.images#5]
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.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1058)
at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:274)
at $Proxy0.flush(Unknown Source)
at org.hibernate.ce.auction.test.junit.hibernate.TestCaseWithData.inTransaction(TestCaseWithData.java:161)
at org.hibernate.ce.auction.test.junit.hibernate.HibernateTest.runTest(HibernateTest.java:28)
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 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:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.sql.SQLException: Statement parameter 2 not set.
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1027)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:675)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1162)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1079)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1064)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1039)
... 27 more
Hibernate:
insert
into
CATEGORY


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 27, 2006 3:05 pm 
Newbie

Joined: Mon Jun 07, 2004 12:59 pm
Posts: 13
I thought the port number for MySQL was 3306 not 3307.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 5:03 pm 
Newbie

Joined: Sat Oct 22, 2005 1:51 am
Posts: 3
harta1 wrote:
I thought the port number for MySQL was 3306 not 3307.


Well, I am using 3 versions of mysql and I assign different port numbers for them. This mysql 4.1 is using port 3307.

From the exception we can see, this is not the port number problem. Because if port number is wrong, the program cannot connect mysql completely, not just SQL statements error.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 6:11 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I don't test alpha releases on MySQL, you are on your own.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.