Try to set the following property in your persistence.xml : <property name="openjpa.jdbc.sql.DBDictionary" value="oracle"/>
Thanks, Rick On Thu, Jun 26, 2014 at 7:54 AM, Rupert Smith <[email protected]> wrote: > I am getting this error during installDBDictionary: > > Caused by: java.sql.SQLException: could not use local transaction commit in > a global transaction > at > > oracle.jdbc.driver.PhysicalConnection.disallowGlobalTxnMode(PhysicalConnection.java:6825) > at > oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3812) > at > oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3857) > at > > oracle.jdbc.OracleConnectionWrapper.commit(OracleConnectionWrapper.java:140) > at > > org.tranql.connector.jdbc.ManagedXAConnection.localTransactionCommit(ManagedXAConnection.java:102) > at > > org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.commit(AbstractManagedConnection.java:199) > at > > org.tranql.connector.jdbc.ConnectionHandle.setAutoCommit(ConnectionHandle.java:160) > at > > org.apache.openjpa.lib.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection.java:167) > at > > org.apache.openjpa.lib.jdbc.DelegatingConnection.setAutoCommit(DelegatingConnection.java:167) > at > > org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.setAutoCommit(ConfiguringConnectionDecorator.java:117) > at > > org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.<init>(ConfiguringConnectionDecorator.java:111) > at > > org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:93) > at > > org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:99) > at > > org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:94) > at > > org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:236) > ... 82 more > > I am using an XADataSource, and this data source is set up in my > persistence.xml: > > <jta-data-source>osgi:service/javax.sql.DataSource/( > osgi.jndi.service.name=jdbc/AppDataSource)</jta-data-source> > <non-jta-data-source>osgi:service/javax.sql.DataSource/( > osgi.jndi.service.name=jdbc/AppDataSource)</non-jta-data-source> > > I am thinking the above error might be caused because the > installDBDictionary process tries to take the data source and put it in > autocommit mode? > > Should I be setting up a non-XA datasource and configuring that as the > <non-jta-data-source> in the persistence.xml? > > Thanks for your help. > > Rupert > -- *Rick Curtis*
