NameNotFoundExceptions during start up of ATG application on JBoss

When you start up your ATG application on JBoss and see NameNotFoundExceptions like the following it could be because you did not configure your ATG datasources correctly.

Unable to start service "/atg/dynamo/service/jdbc/JTDataSource":
 atg.nucleus.ServiceException:
 Unable to resolve reference to JNDI component:
 java:/atgcore_ds
ERROR [nucleusNamespace.atg.dynamo.service.jdbc.JTDataSource]
javax.naming.NameNotFoundException: atgcore_ds not bound

To properly configure it create an atg-oracle-ds.xml file. I have a sample one below. atgcore_ds is the datasource for most of the ATG repositories. You will probably need to configure datasources for Catalog A and Catalog B if you are doing eCommerce, e.g. atgcataloga_ds and atgcatalogb_ds. The atg-oracle-ds.xml file will go into your server’s configuration, e.g. <jboss>/server/betweengo/deploy.

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
 <local-tx-datasource>
  <jndi-name>atgcore_ds</jndi-name>
  <!-- <connection-url>jdbc:oracle:oci:@Dynamo</connection-url> -->
  <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  <user-name>foo</user-name>
  <password>bar</password>
  <min-pool-size>1</min-pool-size>
  <max-pool-size>4</max-pool-size>
 </local-tx-datasource>
</datasources>

Note that the connection URL should be the same as what you configured in your tnsnames.ora file.  If you installed Oracle with a Microsoft Loopback Adapter and pointed the host in your tnsnames.ora configuration to the loopback connection, e.g. 192.168.1.200, then you should do the same in your atg-oracle-ds.xml file.

For further reading please see Getting Started with ATG – jBoss and Oracle and Create Additional JBoss Application Server Configurations.

Leave a Reply

Your email address will not be published. Required fields are marked *