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().]

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web10

  • via Unknown by Mathias Bogaert,
  • via Unknown by Mathias Bogaert,
  • Stack trace

    • 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.