Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: JBoss 5.0 alpha
Using the new EmbeddedId and Embeddable to do a composite key made up of two Integer fields, I'm getting the following exception. I suspect that I didn't do my hashCode() method correctly. How should it be done for two Integer fields int1.hashCode() + int2.hashCode()?
Thanks
Code:
2005-01-21 10:28:32,936 DEBUG [org.jboss.ejb3.HibernateSessionFactory] ************** closing hibernate session **************
2005-01-21 10:28:32,936 DEBUG [org.hibernate.impl.SessionImpl] closing session
2005-01-21 10:28:32,936 DEBUG [org.hibernate.impl.SessionImpl] disconnecting session
2005-01-21 10:28:32,936 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
2005-01-21 10:28:32,936 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-01-21 10:28:32,936 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2005-01-21 10:28:32,936 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
2005-01-21 10:28:32,952 DEBUG [org.hibernate.engine.CacheSynchronization] transaction after completion callback, status: 4
2005-01-21 10:28:32,952 DEBUG [org.hibernate.impl.SessionImpl] transaction completion
2005-01-21 10:28:32,952 INFO [STDOUT] javax.transaction.TransactionRolledbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=1106328444009IT/27, BranchQual=, localId=27] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.HibernateException: identifier of an instance of Symbol altered from Symbol@0 to null)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxSupport.endTransaction(TxSupport.java:220)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxSupport.invokeInOurTx(TxSupport.java:153)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxSupport$Required.serverInvoke(TxSupport.java:438)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor.internalInvoke(TxInterceptor.java:112)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor.invoke(TxInterceptor.java:60)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:62)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:36)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:66)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:148)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:102)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:74)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:293)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:169)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:255)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:304)
2005-01-21 10:28:32,952 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:147)
2005-01-21 10:28:33,014 DEBUG [org.jboss.remoting.transport.socket.ServerThread] IOException when reading in ACK