File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Kodos and XA Datasource on Weblogic 10 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Kodos and XA Datasource on Weblogic 10" Watch "Kodos and XA Datasource on Weblogic 10" New topic
Author

Kodos and XA Datasource on Weblogic 10

Venkat dasari
Ranch Hand

Joined: Nov 12, 2003
Posts: 67
Hi,
I am trying to create an XA datasource on weblogic 10 and when i try to retrieve the records from the db, i get the below error. "Cannot Set Auto-Commit mode when using distributed transaction" Also below is my persistence.xml

Exception in thread "main" javax.ejb.EJBException: nested exception is: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.0.2-r420667:627158 fatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot set auto-commit mode when using distributed transactions
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is <openjpa-1.0.2-r420667:627158 fatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot set auto-commit mode when using distributed transactions
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:379)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:377)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:261)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="persistence1" transaction-type="JTA">
<jta-data-source>persist-XA</jta-data-source>
<class>---</class>
<properties>
<property name="kodo.Connection2Username" value="val"/>
<property name="kodo.Connection2Password" value="val"/>
<property name="kodo.Connection2URL" value="jdbc racle:thin:@IP:1521 ev1"/>
<property name="kodo.Connection2DriverName" value="oracle.jdbc.xa.client.OracleXADataSource"/>
<property name="kodo.ConnectionFactory2Properties" value="MaxActive=20, MaxIdle=10"/>
<property name="kodo.TransactionMode" value="managed"/>
<property name="kodo.ConnectionFactoryMode" value="managed"/>
</properties>
</persistence-unit>
</persistence>

Please provide your inputs.

Regards,
Venkat Dasari


Regards,<br />Venkat Dasari<br />SCJP 1.4, SCBCD.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Kodos and XA Datasource on Weblogic 10
 
Similar Threads
Kodos + XA DataSource + Weblogic 10
Could not resolve a persistence unit corresponding to the persistence-context-ref-name
Weblogic 10 +XA Data Source
NO commit() in code, but getting "Operation Connection.commit is not allowed during a global transa"
A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.