Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exception accessing MySql: Cannot disable AUTO_COMMIT

0 views
Skip to first unread message

Dirk

unread,
May 15, 2002, 2:37:50 PM5/15/02
to

How can I avoid this exception?
(
finder-query is defined in weblogic-cmp-rdbms-jar.xml as:
<finder-query><![CDATA[(= surName $0)]]></finder-query>
)

javax.ejb.FinderException: Problem preparing or executing statement: 'SELECT ejbTest_
ID, firstname, surname, sex FROM cp WHERE (surname = ?)':
java.sql.SQLException: Cannot disable AUTO_COMMIT
at org.gjt.mm.mysql.Connection.setAutoCommit(Connection.java:396)
at weblogic.jdbcbase.jts.Connection.openConnectionIfNecessary(Connection.java
:619)
at weblogic.jdbcbase.jts.Connection.prepareStatement(Connection.java:135)
at de.duit.ejb.ContactPartnerPSWebLogic_CMP_RDBMS.findBySurname(ContactPartne
rPSWebLogic_CMP_RDBMS.java:556)
at de.duit.ejb.ContactPartnerBeanHomeImpl.findBySurname(ContactPartnerBeanHom
eImpl.java:99)
at de.duit.ejb.ContactPartnerBeanHomeImpl_WLSkel.invoke(ContactPartnerBeanHom
eImpl_WLSkel.java:134)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectA
dapter.java:347)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHand
ler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java
:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)

at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:7
6)
at de.duit.ejb.ContactPartnerBeanHomeImpl_WLStub.findBySurname(ContactPartner
BeanHomeImpl_WLStub.java:350)
at de.duit.ejb.ContactPartnerBeanHomeImpl_ServiceStub.findBySurname(ContactPa
rtnerBeanHomeImpl_ServiceStub.java:237)
at EjbTester.main(EjbTester.java:69)

Please contact me by email if possible.

Thanks a lot,

Dirk

Joseph Weinstein

unread,
May 15, 2002, 5:16:31 PM5/15/02
to Dirk
Dirk wrote:

> How can I avoid this exception?

Hi. Weblogic interacts via standard JDBC calls to enact transactions according to the
JDBC and EJB specs. I believe MySql and/or that JDBC driver doesn't qualify as a
fully functional DBMS. If it cannot implement the semantics of autoCommit(false), it
is unuseable for multiple-statement transactions which require standard ACID properties.
Joe

Cameron Purdy

unread,
May 22, 2002, 8:48:56 PM5/22/02
to
> java.sql.SQLException: Cannot disable AUTO_COMMIT
I think you can use MySQL with the InnoDb option and make sure you have the
latest driver.

Peace,

--
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/

"Dirk" <dirk....@gmx.de> wrote in message
news:3ce2aafe$1...@newsgroups2.bea.com...
>

Heikki Tuuri

unread,
May 24, 2002, 1:48:36 AM5/24/02
to
Hi!

"Joseph Weinstein" <j...@bea.com> wrote in message
news:3CE2D02E...@bea.com...


> Dirk wrote:
>
> > How can I avoid this exception?
>
> Hi. Weblogic interacts via standard JDBC calls to enact transactions
according to the
> JDBC and EJB specs. I believe MySql and/or that JDBC driver doesn't
qualify as a
> fully functional DBMS. If it cannot implement the semantics of
autoCommit(false), it
> is unuseable for multiple-statement transactions which require standard
ACID properties.

MySQL supports transactions with InnoDB and BDB type tables if you run the
MySQL-Max standard distribution from www.mysql.com. The SQL command to set
the autocommit off is

SET AUTOCOMMIT=0

The mm.MySQL JDBC driver below seems to fail in setting it off. Please check
that you are running MySQL-Max, and that you have the latest version of
mm.MySQL.

The recent eWEEK benchmark
http://www.eweek.com/article/0,3658,s=708&a=23115,00.asp
was run with Weblogic on MySQL with InnoDB tables. Thus we know it is
possible to get Weblogic working on MySQL/InnoDB.

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com

0 new messages