Skip navigation links

MySQL Forums :: Connector/JDBC and Java :: autocommit=true problem with oc4j application server


Advanced Search

Re: autocommit=true problem with oc4j application server
Posted by: Mark Matthews ()
Date: June 24, 2005 03:23PM

faisal iqbal wrote:
> i am using container managed enterprise java
> beans, also a container managed session facade.
> JDBC driver is connectorJ for mysql database. when
> i deploy the ejbs on server, during deployment it
> issues following warnings.
>
> "canot call commit when autocommit=true"
>
> when container try to commit the transaction in
> any method of ejb then it throws following
> exception.
>
> oracle.oc4j.rmi.OracleRemoteException: Error open
> transaction is not closed
>
> at
> UserMgmtSessionEJB_StatelessSessionBeanWrapper115.
> registerNewUser(UserMgmtSessionEJB_StatelessSessio
> nBeanWrapper115.java:557)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
> e Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(Native
> MethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(De
> legatingMethodAccessorImpl.java:25)
>
> at
> java.lang.reflect.Method.invoke(Method.java:324)
>
> at
> com.evermind.server.rmi.RMICallHandler.run(RMICall
> Handler.java:67)
>
> at
> com.evermind.server.rmi.RMICallHandler.run(RMICall
> Handler.java:47)
>
> at
> com.evermind.server.rmi.InterceptorCallHandlerWrap
> per.run(InterceptorCallHandlerWrapper.java:18)
>
> at
> com.evermind.util.ReleasableResourcePooledExecutor
> $MyWorker.run(ReleasableResourcePooledExecutor.jav
> a:299)
>
> at java.lang.Thread.run(Thread.java:534)
>
> at connection to xerces/192.168.0.205 as admin
> at
> UserMgmtSessionEJB_StatelessSessionBeanWrapper115.
> registerNewUser(UserMgmtSessionEJB_StatelessSessio
> nBeanWrapper115.java:557)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
> e Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(Native
> MethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(De
> legatingMethodAccessorImpl.java:25)
>
> at
> java.lang.reflect.Method.invoke(Method.java:324)
>
> at
> com.evermind.server.rmi.RMICallHandler.run(RMICall
> Handler.java:67)
>
> at
> com.evermind.server.rmi.RMICallHandler.run(RMICall
> Handler.java:47)
>
> at
> com.evermind.server.rmi.InterceptorCallHandlerWrap
> per.run(InterceptorCallHandlerWrapper.java:18)
>
> at
> com.evermind.util.ReleasableResourcePooledExecutor
> $MyWorker.run(ReleasableResourcePooledExecutor.jav
> a:299)
>
> at java.lang.Thread.run(Thread.java:534)
>
>
>
> Regards,
> Faisal Iqbal


Faisal,

The JDBC spec used to require that you can't call commit() when autoCommit==true (and even tested for it in the compliance test).

If you have a container that does this, add "relaxAutoCommit=true" to your URL and this problem should go away.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject Written By Posted
autocommit=true problem with oc4j application server faisal iqbal 06/24/2005 08:06AM
Re: autocommit=true problem with oc4j application server Mark Matthews 06/24/2005 03:23PM
Re: autocommit=true problem with oc4j application server faisal iqbal 06/24/2005 10:52PM
Re: autocommit=true problem with oc4j application server dd dd 02/08/2008 03:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.