Cpwere (1) [Avatar] Offline
#1
Hi All,

I'm trying to run a simple example of an stateless EJB where (the PlaceBidBean) tries to persist a Bid object to the DB Table (BIDS) through JPA EntityManager,
however upon running the PlaceBidBeanClient to test the Session bean through ANT i get the following error:

run:
[echo] Executing client class
[java] javax.ejb.EJBException: nested exception is: <1.0.0.1.1 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot set auto-commit mode when using distributed transactions
[java] <1.0.0.1.1 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot set auto-commit mode when using distributed transactions
[java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:546)

[java] at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1040)
[java] at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
[java] at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
[java] Caused by: java.lang.Exception: java.sql.SQLException: Cannot set auto-commit mode when using distributed transactions

My DataSource Settings are:
<create type="JDBCConnectionPool" name="ABPool" property="abpool">
<set attribute="CapacityIncrement" value="1"/>
<set attribute="DriverName" value="oracle.jdbc.OracleDriver"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="10"/>
<set attribute="Password" value="ab"/>
<set attribute="Properties" value="user=ab"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="URL" value="jdbc:oracle:thin:@127.0.0.1:1521:XE"/>
<set attribute="Targets" value="${com.server.name}"/>
</create>

And I cannot find a way that i can manually configure the JDBC Connection Pool to disable autocommit.

Can anyone please advice?

Regards,
Siphiwe Madi