Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10591

License loading on Spring Boot Starter fails when db autoCommit is enabled

      What are the steps to reproduce your problem?

      • Use the Camunda Webapps EE Spring Boot Starter version 3.1.1 or above with the camunda license provided in resources/
      • Use PostgreSQL 9.6.5.

      What is the problem?
      When the Camunda Spring Boot application is started, it fails with a PSQLException: Cannot commit when autoCommit is enabled exception related to the EnterLicenseKeyConfiguration class.

      What would be the expected behavior:
      The license is loaded and committed correctly and the application is successfully started.

      Hints (optional):
      The Camunda Spring Boot Starter version 3.1.1 performs an explicit commit statement when the license key is entered in the database. This doesn't work well with the PostgreSQL auto-commit feature, which internally begins and commits a transaction automatically on each db operation.

        This is the controller panel for Smart Panels app

            [CAM-10591] License loading on Spring Boot Starter fails when db autoCommit is enabled

            Solution idea: Use a custom engine command plus mybatis to insert the license, which should disable autocommit for the transaction and do the commit properly.

            Thorben Lindhauer added a comment - Solution idea: Use a custom engine command plus mybatis to insert the license, which should disable autocommit for the transaction and do the commit properly.

            Design decisions:

            • Removed existing, explicit db code and used an Engine API Command to enter the License key;
            • Remove redundant tests, since the Engine API already handles (and is tested) for db prefixes.

            Nikola Koevski added a comment - Design decisions: Removed existing, explicit db code and used an Engine API Command to enter the License key; Remove redundant tests, since the Engine API already handles (and is tested) for db prefixes.

              akif.hazarvi Akif
              nikola.koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: