Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2742

SchemaTool fails with MySQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.3, 3.0.0
    • 2.4.4, 3.1.0
    • jdbc

    Description

      When running the SchemaTool for db initialization, an exception is reported:

      MySQLNonTransientConnectionException: Can't call rollback when autocommit=true
      

      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.

      Attachments

        Issue Links

          Activity

            People

              ilgrosso Francesco Chicchiriccò
              ilgrosso Francesco Chicchiriccò
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: