org.quartz.JobPersistenceException: Couldn't commit jdbc connection. You cannot commit during a managed transaction! [See nested exception: java.sql.SQLException: You cannot commit during a managed transaction!]

Terracotta | tstiemer | 2 years ago
  1. 0

    Java JPA annotation @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) not working as expected

    Stack Overflow | 2 years ago | tstiemer
    org.quartz.JobPersistenceException: Couldn't commit jdbc connection. You cannot commit during a managed transaction! [See nested exception: java.sql.SQLException: You cannot commit during a managed transaction!]
  2. 0

    You cannot commit during a managed transaction!

    Terracotta | 2 years ago | tstiemer
    org.quartz.JobPersistenceException: Couldn't commit jdbc connection. You cannot commit during a managed transaction! [See nested exception: java.sql.SQLException: You cannot commit during a managed transaction!]
  3. 0

    Quartz requires a non managed TX datasource to be set (nonManagedTXDataSource) when using JobStoreCMT. Spring uses the same datasource for the managed and non-managed transactional datasources. This causes Quartz to fail upon init using strict XADataSource drivers (WebLogic/WebSphere). Exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource': java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback(). [See nested exception: java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().] at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:1402) at org.quartz.impl.jdbcjobstore.JobStoreCMT.cleanVolatileTriggerAndJobs(JobStoreCMT.java:216) at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:501) at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:150) at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:118) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:915) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1047) at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:543) at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:494) More info, see: http://wiki.opensymphony.com/display/QRTZ1/ConfigJobStoreCMT

    Spring JIRA | 1 decade ago | Mathias Bogaert
    org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource': java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback(). [See nested exception: java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Quartz requires a non managed TX datasource to be set (nonManagedTXDataSource) when using JobStoreCMT. Spring uses the same datasource for the managed and non-managed transactional datasources. This causes Quartz to fail upon init using strict XADataSource drivers (WebLogic/WebSphere). Exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource': java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback(). [See nested exception: java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().] at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:1402) at org.quartz.impl.jdbcjobstore.JobStoreCMT.cleanVolatileTriggerAndJobs(JobStoreCMT.java:216) at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:501) at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:150) at org.springframework.scheduling.quartz.LocalDataSourceJobStore.initialize(LocalDataSourceJobStore.java:118) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:915) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1047) at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:543) at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:494) More info, see: http://wiki.opensymphony.com/display/QRTZ1/ConfigJobStoreCMT

    Spring JIRA | 1 decade ago | Mathias Bogaert
    org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource': java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback(). [See nested exception: java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().]
  6. 0

    [SPR-821] LocalDataSourceJobStore setting a TX datasource for nonManagedTXDataSource - Spring JIRA

    spring.io | 8 months ago
    org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource': java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA driver supports performing SQL operations with no global transaction, explicitly allow it by setting "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.quartz.JobPersistenceException

      Couldn't commit jdbc connection. You cannot commit during a managed transaction! [See nested exception: java.sql.SQLException: You cannot commit during a managed transaction!]

      at org.quartz.impl.jdbcjobstore.JobStoreSupport.commitConnection()
    2. quartz
      StdScheduler.checkExists
      1. org.quartz.impl.jdbcjobstore.JobStoreSupport.commitConnection(JobStoreSupport.java:3661)
      2. org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3799)
      3. org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
      4. org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3703)
      5. org.quartz.impl.jdbcjobstore.JobStoreSupport.checkExists(JobStoreSupport.java:1897)
      6. org.quartz.core.QuartzScheduler.checkExists(QuartzScheduler.java:1491)
      7. org.quartz.impl.StdScheduler.checkExists(StdScheduler.java:555)
      7 frames