java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setOracle .jdbc.ReadTimeout(java.lang.String))
Issue
- We are using OracleXADataSource API ConnectionProperties, When we try to configure multiple oracle XA DataSource ConnectionProperties for limiting the connection time to the database like these:
<xa-datasource-property name="ConnectionProperties">
oracle.net.CONNECT_TIMEOUT=5000
oracle.jdbc.ReadTimeout=3600000
</xa-datasource-property>
- Our version of Oracle
ojdbc is 11.2.0.4. We get the warning at the second line of this configuration, saying:
java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setOracle.jdbc.ReadTimeout(java.lang.String))
- But when we configure only one properties below, We don't receive the that warning. When we get the warning, this properties don't work at all. Can you tell us if there is some bug in the OracleXADataSource API and if so can you tell us if there is some workaround.
<xa-datasource-property name="ConnectionProperties">oracle.jdbc.ReadTimeout=3600000</xa-datasource-property>
Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setOracle.jdbc.ReadTimeout(java.lang.String))
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:621)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:458)
... 77 more
Caused by: java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setOracle.jdbc.ReadTimeout(java.lang.String)
at java.lang.Class.getMethod(Class.java:1605)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:591)
... 78 more
- Our objective is to have the properties like this:
<xa-datasource-property name="ConnectionProperties">
oracle.net.CONNECT_TIMEOUT=5000
oracle.jdbc.ReadTimeout=3600000
</xa-datasource-property>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.1.1
- XA Datasource
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
