tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keulkeul <>
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="" 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

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

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:
Sent from the OpenEJB User mailing list archive at

View raw message