tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keulkeul <baron.mick...@gmail.com>
Subject HBM2DDL tool throws a java.sql.SQLException exception (Auto-commit can not be set while enrolled in a transaction)
Date Fri, 13 Nov 2009 13:13:41 GMT

I'm using an OpenEJB standalone server for deploying a sample application
which contains a set of POJOs (EJB Entity using JPA and Hibernate
technologies) and services.

The schema of the database (DDL) is obtained by the hbm2ddl tool (the
following property is configured into the persistence.xml (<property
name="hibernate.hbm2ddl.auto" value="update" />)). Unfortunately, during the
hbm2ddl schema update step an exception is occurred (java.sql.SQLException:
Auto-commit can not be set while enrolled in a transaction).

Here is the scenario which leads to my problem

- I'm starting an OpenEJB standalone server (openejb.bat start)
- I'm deploying my sample application sample.jar (openejb.bat deploy
d:\openejb-3.1.2\sample.jar)

The deploying is working. sample.jar file is copied into the Apps directory
of the OpenEJB directory. In checking the hibernate logs, i noticed that all
POJOs are binded with its associated table. However when hbm2ddl schema
update tool is started, i have a set of type exception
java.sql.SQLException: Auto-commit can not be set while enrolled in a
transaction.

On the other side, if the OpenEJB standalone server is not yet started and
if i copy directly sample.jar file into the Apps directory of OpenEJB
installation (in fact, i have done an explicit deploy) and finally if i
start the OpenEJB standalone server, the hbm2ddl schema update is working.
All the tables are created into the database.

Any idea about this problem ?
-- 
View this message in context: http://old.nabble.com/HBM2DDL-tool-throws-a-java.sql.SQLException-exception-%28Auto-commit-can-not-be-set-while-enrolled-in-a-transaction%29-tp26336380p26336380.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message