java.sql.SQLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • ojdbc14.jar to ojdbc6.jar migration | Len
    via by Unknown author,
  • The oracle v12 driver throws the following exception if commit() is called on a connection that has auto-commit enabled(see [1]) . This seems to be a change in behaviour since v11. {code} caused by: java.sql.SQLException: Could not commit with auto-commit set on at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443) at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490) at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211) at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDropTables(DefaultJDBCAdapter.java:148) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.deleteAllMessages(JDBCPersistenceAdapter.java:534) ... 40 more {code} In the org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() it explicitly calls connection.commit() without checking if auto-commit is enabled. In other places auto-commit does seem to be checked before commit is called - org.apache.activemq.store.jdbc.TransactionContext#commit(). The v12 driver does allow autocommit-SpecCompliance to be turned off by setting system property "oracle.jdbc.autoCommitSpecCompliant=false". But it does seem like org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() is not strictly adhering to the spec. I think it would be better to do a check if auto-commit is on before calling connection.commit(). I will attach a github pull request with test and potential fix - for someone to review.
    via by Pat Fox,
    • java.sql.SQLException: Could not commit with auto-commit set on at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2356) at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:2403) at org.apache.sqoop.manager.OracleManager.getColumnNames(OracleManager.java:764) at org.apache.sqoop.orm.ClassWriter.getColumnNames(ClassWriter.java:1207) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1062) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476) at org.apache.sqoop.Sqoop.run(Sqoop.java:145) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229) at org.apache.sqoop.Sqoop.main(Sqoop.java:238) at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    3 more bugmates