Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

set autocommit= off in JDBC driver

Kim GabrielsenJun 29 2013 — edited Jun 29 2013

Hi,

i'm running jdev v. 11.1.2.4 and deploying a simple ADF application on glassfish against a mySQL database v 5.1.....

when i commit my changes to the database i receive an exception:

at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

    at java.lang.Thread.run(Thread.java:722)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

    a|#]

it's pretty obvious what is causing it but how do i set autocommit off in JDev?

I've looked into bc4j.cfg but don't see any indications here. is it related to the JDBC pool on glassfish? and as such not a JDev/ADF problem?

/

Kim

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2013
Added on Jun 29 2013
1 comment
1,255 views