"java.sql.SQLException: Invalid argument(s) in call" when trying to connect to Oracle database using Aries enlisted JDBC driver
Issue
When enlisting the Oracle JDBC driver in Aries similar to the config in [1] and using that wrapped (xa aware) driver to connect to the Oracle 11 database, it raises the following error:
java.sql.SQLException: Invalid argument(s) in call
Full error message with stack trace below in [2].
[1]
<bean id="dataSource" class="oracle.jdbc.xa.client.OracleXADataSource" >
<property name="URL" value="jdbc:oracle:thin:@localhost:1521:XE" />
<property name="user" value="admin" />
<property name="password" value="oracle" />
<property name="connectionCachingEnabled" value="false" />
</bean>
<service interface="javax.sql.XADataSource" ref="dataSource">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/oracle"/>
<entry key="datasource.name" value="Oracle"/>
</service-properties>
</service>
[2]
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Invalid argument(s) in call
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)[264:org.apache.servicemix.bundles.spring-jdbc:3.2.8.RELEASE_1]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:575)[264:org.apache.servicemix.bundles.spring-jdbc:3.2.8.RELEASE_1]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617)[264:org.apache.servicemix.bundles.spring-jdbc:3.2.8.RELEASE_1]
at org.apache.camel.test.TestProcessor.insert(TestProcessor.java:55)[255:dts.filestore.routes-trimmed-6.1:1.0.0.SNAPSHOT]
at org.apache.camel.test.TestProcessor.process(TestProcessor.java:46)[255:dts.filestore.routes-trimmed-6.1:1.0.0.SNAPSHOT]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:97)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:139)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:64)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]
at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_45]
at java.util.TimerThread.run(Timer.java:505)[:1.7.0_45]
Caused by: java.sql.SQLException: Invalid argument(s) in call
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:209)[253:wrap_mvn_com.oracle_ojdbc6_11.2.0:0]
at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:76)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.tranql.connector.jdbc.AbstractXADataSourceMCF.createManagedConnection(AbstractXADataSourceMCF.java:66)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:49)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:109)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:81)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at org.tranql.connector.jdbc.TranqlDataSource.getConnection(TranqlDataSource.java:62)[118:org.apache.aries.transaction.jdbc:1.0.1.redhat-610379]
at Proxy1fba8d14_d2b7_481d_86bd_bdb4e72fa591.getConnection(Unknown Source)[:]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)[264:org.apache.servicemix.bundles.spring-jdbc:3.2.8.RELEASE_1]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)[264:org.apache.servicemix.bundles.spring-jdbc:3.2.8.RELEASE_1]
... 15 more
Environment
- JBoss Fuse 6.1, Oracle JDBC driver enlisted in Aries as per this documentation.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.