This kind of exceptions occur when the Oracle JDBC Driver (ojdbc6.jar) version 12 or above will be used. Version 12 and above of the driver is more strictly than earlier driver versions.

You can solve the problem, you have few options:

  1. Change jar file to old version.( Below 12; usually issue occurs while migrating to new server)
  2. Override behavior of new jar version(ojdbc6.jar) with setting below JVM arguments.

    -Doracle.jdbc.autoCommitSpecCompliant=false

  3. Set Auto Commit off in Java/SQL:

    Java:

    conn.setAutoCommit(false);

    Oracle:

    SET AUTOCOMMIT OFF

其中 第二个方法 被证实有效。

参考 http://stackoverflow.com/questions/23953534/java-sql-sqlexception-could-not-commit-with-auto-commit-set-on-at-oracle-jdbc-d

java.sql.SQLException: Could not commit with auto-commit set on的更多相关文章

  1. mysql java.sql.SQLException: Can't call commit when autocommit=true

    java.sql.SQLException: Can't call commit when autocommit=true at com.mysql.jdbc.SQLError.createSQLEx ...

  2. Oracle java.sql.SQLException: 数字溢出

    六月 30, 2016 5:47:47 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinit ...

  3. java.sql.SQLException: ORA-28001: the password has expired。

    java.sql.SQLException: ORA-28001: the password has expired. Oracle11g的密码过期. 原因:是由于oracle11g中默认在defau ...

  4. java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: YES)

    1.错误描述 ERROR:2015-05-01 23:43:04[localhost-startStop-1] - HHH000319: Could not get database metadata ...

  5. java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: NO)

    1.错误描述 INFO:2015-05-01 16:53:29[main] - HHH000228: Running hbm2ddl schema update INFO:2015-05-01 16: ...

  6. 解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation

    报错信息: -- ::, INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for org.a ...

  7. java.sql.SQLException: No suitable driver

    java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(Unknown Source) at com ...

  8. java.sql.SQLException: Field 'id' doesn't have a default value解决方案

    转自:https://blog.csdn.net/xinghuo0007/article/details/51810867 自增长:java.sql.SQLException: Field 'id' ...

  9. 启动Spring boot报错:nested exception is java.sql.SQLException: Field 'id' doesn't have a default value

    先看具体日志: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n ...

  10. Springboot Jpa: [mysql] java.sql.SQLException: Duplicate entry 'XXX' for key 'PRIMARY'

    前言 1.问题背景 偶尔会出现登录请求出错的情况,一旦失败就会短时间内再也登录不上,更换浏览器或者刷新可能会暂时解决这个问题. 项目运行日志如下: 2022-07-21 09:43:40.946 DE ...

随机推荐

  1. 山东省第四届ACM程序设计竞赛A题:Rescue The Princess(数学+计算几何)

    Rescue The Princess Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 412  Solved: 168[Submit][Status][ ...

  2. zabbix 上 mysql 优化

    摘自: https://segmentfault.com/a/1190000001638101

  3. 如何在VMware Workstation上安装CentOS_7

    1.首先打开VMware Workstation-文件-新建虚拟机 2.选择自定义向导,下一步. 3.由于我的软件版本比较高,不想太多硬件限制就选了版本11.也可以选择低一些版本的,这样兼容性会更好, ...

  4. ps炫光素材

    炫光闪电笔刷,炫光闪电笔刷,雷电笔刷,自然闪电Photoshop笔刷下载ps炫光素材 素材下载:http://www.huiyi8.com/sc/8695.html

  5. CentOS 7编译安装Tengine+PHP+MariaDB全程笔记

    安装环境:CentOS7 3.10.0-693.5.2.el7.x86_64 准备源码包: pcre-8.41.tar.gz openssl-1.0.1h.tar.gz zlib-1.2.11.tar ...

  6. php设置文件编码

    <?php @header('Content-type: text/html;charset=UTF-8'); ?>

  7. C#多线程编程介绍——使用thread、threadpool、timer

    C#多线程编程介绍——使用thread.threadpool.timer 在system.threading 命名空间提供一些使得能进行多线程编程的类和接口,其中线程的创建有以下三种方法:thread ...

  8. 遁入NOIP记

    回归noip啦 给自己定个小目标 500分起步 在这里列一下需要搞的东西OvO 1.算法基础 模拟 贪心 二分 分治 2.搜索 / 记忆化搜索 剪枝 对抗搜索 3.dp 状压 组合数学 树D 单队 D ...

  9. ACM学习历程——HDU 5014 Number Sequence (贪心)(2014西安网赛)

    Description There is a special number sequence which has n+1 integers. For each number in sequence, ...

  10. poj2279排队——杨氏矩阵与钩子公式(DP爆内存)

    题目:http://poj.org/problem?id=2279 书上的DP做法会爆内存,尝试写了一个,过了样例. 转载: 代码如下: #include<iostream> #inclu ...