Hibernate version: 2.1.6
Name and version of the database you are using: Oracle8
I have configured Hibernate in JBoss as a .har. All the hbm and DAO files are in the .har including the hibernate-service.xml in the META-INF folder.
When a client makes a query request, the results are properly queried and send back to the client. But when trying to add a record to the database (session.save(dao)) i get the following exception. I think there's something wrong in transaction management.
I do not use user transaction hence no begin/commit transactions available in my source. Instead i want to use the server transaction management capability. Pls help me to configure for JTA transactions.
Code:
2004-11-03 14:23:13,191 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
2004-11-03 14:23:13,191 DEBUG [org.jboss.hibernate.session.TransactionSynch] Preparing synch [name=java:/hibernate/SessionFactory, session=net.sf.hibernate.impl.SessionImpl@19aa56a]
2004-11-03 14:23:13,191 INFO [STDOUT] session opened
2004-11-03 14:23:13,191 INFO [STDOUT] before save
2004-11-03 14:23:13,191 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:283)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:95)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:854)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:920)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1213)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:877)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.mq.SpySession.run(SpySession.java:351)
2004-11-03 14:23:13,201 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
2004-11-03 14:23:13,201 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
2004-11-03 14:23:13,201 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
2004-11-03 14:23:13,201 INFO [STDOUT] java.lang.ClassCastException