Francesco Chicchiriccò created OPENJPA-2742:
-----------------------------------------------
Summary: SchemaTool fails with MySQL
Key: OPENJPA-2742
URL: https://issues.apache.org/jira/browse/OPENJPA-2742
Project: OpenJPA
Issue Type: Bug
Components: jdbc
Affects Versions: 3.0.0, 2.4.3
Reporter: Francesco Chicchiriccò
Assignee: Francesco Chicchiriccò
Fix For: 3.0.1
When running the SchemaTool for db initialization, an exception is reported:
{code:java}
MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
{code}
No tables are created, and the OpenJPA initialization fails.
The problem is originated in SchemaTool#executeSQL where a rollback is issued
before any DDL statement is effectively run, and this causes troubles to MySQL.
Prior to version 8, the MySQL JDBC Driver used to provide a property
{{relaxAutocommit=true}} to append to the JDBC URL, which could be leveraged as
workaround; now [this option was
removed|https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-properties-changed.html].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)