| Hi,
 if I create the EntityManagerFactory with the property
 
 props.put("hibernate.hbm2ddl.auto", "update");
 
 I get an exception:
 
 HHH000319: Could not get database metadata: java.sql.SQLException: You cannot set autocommit during a managed transaction!
 at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:888)
 at org.jboss.jca.adapters.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:715)
 
 Probably this is because of the usage of container managed transactions with JTA?
 
 Is there any solution to create the DB schema automatically with JTA?
 
 Cheers
 Oliver
 
 
 |