Hi,
I am trying to implement a simple session bean that calls persistent POJO. I gave the following parameters in hibernate.properties:
hibernate.connection.datasource VerdeDataSource
hibernate.transaction.factory_class net.sf.hibernate.transaction.JTATransactionFactory
hibernate.transaction.manager_lookup_class net.sf.hibernate.transaction.WeblogicTransactionManagerLookup
hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
and yet I get an exception saying that the SchemaExporter is trying to perform Connection.commit even though I specificaly told it to use JTA.
The excetption is:
19:55:43,093 ERROR SchemaExport:165 - schema export unsuccessful
java.sql.SQLException: Cannot call Connection.commit in distributed transaction.
Transaction Manager will commit the resource manager when the distributed tran
saction is committed.
at weblogic.jdbc.wrapper.JTSConnection.commit(JTSConnection.java:509)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:
121)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:8
4)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.ja
va:198)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:768)
Can someone please help me to understand what I am doing wrong?
thanks
|