Problem
I was getting the following error when I was starting my JBoss Server with an ATG Application deployed. I had a custom datasource by name DirectJTDataSource_CA which was having a JNDI configured as java:/ca - JNDIName=java:/ca
14:43:28,178 ERROR [DirectJTDataSource_CA]
javax.naming.NameNotFoundException: ca not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at atg.nucleus.JNDIReference.getReference(JNDIReference.java:140)
at atg.nucleus.JNDIReference.doStartService(JNDIReference.java:116)
javax.naming.NameNotFoundException: ca not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at atg.nucleus.JNDIReference.getReference(JNDIReference.java:140)
at atg.nucleus.JNDIReference.doStartService(JNDIReference.java:116)
Solution
The issue was because I did not have the JNDI "ca" configured in my jboss ds.xml file. I added the same (see below for what I added) pointing to the schema I had to point it to and restarted the server and the error was gone.
<xa-datasource>
<jndi-name>ca</jndi-name>
<track-connection-by-tx>false</track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property>
<xa-datasource-property name="User">atg_ca</xa-datasource-property>
<xa-datasource-property name="Password">atg123</xa-datasource-property>
<!-- Uncomment the following if you are using Oracle 9i
<xa-datasource-property name="oracle.jdbc.V8Compatible">true</xa-datasource-property>
-->
<exception-sorter-class-name> org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
</xa-datasource>
<jndi-name>ca</jndi-name>
<track-connection-by-tx>false</track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:XE</xa-datasource-property>
<xa-datasource-property name="User">atg_ca</xa-datasource-property>
<xa-datasource-property name="Password">atg123</xa-datasource-property>
<!-- Uncomment the following if you are using Oracle 9i
<xa-datasource-property name="oracle.jdbc.V8Compatible">true</xa-datasource-property>
-->
<exception-sorter-class-name> org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
</xa-datasource>
No comments:
Post a Comment