I'm running into problems using 3.1beta3 as a drop-in replacement of 3.0.5. All CRUD SQL statements seem to be empty. The
funny thing is, JDBCExceptionReporter prints the correct statements, while SQL.log prints an empty line.
Creating Configuration and SessionFactory looks ok, no warnings or errors are logged. SchemaExport/Update runs fine too.
I tried replacing 3.1beta3 with 3.1beta2 and got the same error.
Then i tried 3.1beta1 and it just works as 3.0.5 did.
I'm a little clueless right now. Anybody else has this problem?
Here's a log excerpt with the exception stacktrace:
Code:
2005-09-21 17:12:35,398 [main] DEBUG SessionImpl.<init>():270 - opened session at timestamp: 4617484514463744
2005-09-21 17:12:35,414 [main] DEBUG VersionValue.isUnsaved():44 - version unsaved-value strategy UNDEFINED
2005-09-21 17:12:35,414 [main] DEBUG AbstractSaveEventListener.getEntityState():461 - transient instance of: com.company.model.Test
2005-09-21 17:12:35,414 [main] DEBUG DefaultSaveOrUpdateEventListener.entityIsTransient():161 - saving transient instance
2005-09-21 17:12:35,414 [main] DEBUG AbstractSaveEventListener.performSave():139 - saving [com.company.model.Test#<null>]
2005-09-21 17:12:35,445 [main] DEBUG AbstractSaveEventListener.performSaveOrReplicate():221 - executing insertions
2005-09-21 17:12:35,445 [main] DEBUG Cascade.cascade():237 - processing cascade ACTION_SAVE_UPDATE for: com.company.model.Test
2005-09-21 17:12:35,445 [main] DEBUG Cascade.cascade():259 - done processing cascade ACTION_SAVE_UPDATE for: com.company.model.Test
2005-09-21 17:12:35,460 [main] DEBUG Versioning.seed():35 - Seeding: 0
2005-09-21 17:12:35,460 [main] DEBUG AbstractEntityPersister.insert():1931 - Inserting entity: com.company.model.Test (native id)
2005-09-21 17:12:35,460 [main] DEBUG AbstractEntityPersister.insert():1932 - Version: 0
2005-09-21 17:12:35,460 [main] DEBUG SQL.log():344 -
2005-09-21 17:12:35,476 [main] DEBUG JDBCExceptionReporter.logExceptions():63 - could not insert: [com.company.model.Test] [/* insert com.company.model.Test */ insert into Test (version, name, created, creator, lastModified, modifier) values (?, ?, ?, ?, ?, ?)]
java.sql.SQLException: The SQL statement must not be null or empty.
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:1990)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:343)
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.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:39)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:424)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1938)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2395)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:500)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:494)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:490)
at com.company.dao.AbstractDAO.save(AbstractDAO.java:121)