0 Replies Latest reply on Dec 17, 2004 12:47 PM by Narayana Rallabandi

    NameNotFoundException in EJB

    Narayana Rallabandi Newbie

      I have deploying the rar inside an ear file(Jboss4.0.0) it did deploy by placing the -ds.xml in the deploy directory. But while looking up the rar from session bean it gave NameNotFoundException

      the -ds.xml is as follows:

       <?xml version="1.0" encoding="UTF-8"?>
      
      <connection-factories>
      
       <!-- File XA Resource adapter -->
       <tx-connection-factory>
       <adapter-display-name>jcdFiletoFile1_File2</adapter-display-name>
       <jndi-name>FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2MCF</jndi-name>
       <xa-transaction/>
       <rar-name>FiletoFile_PROJECTDeployment1.ear#jcdFiletoFile1_File2.rar</rar-name>
       <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
       <!--<connection-definition>com.stc.connector.framework.jca.system.STCManagedConnectionFactory</connection-definition>-->
      </tx-connection-factory>
      
      </connection-factories>
      
      




      The same ear file contains the jar file, with a session bean which uses this rar.

      after deploying the messge shown by the Application server is like:


      20:43:34,969 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2MCF,
      service=ConnectionFactoryBinding to JNDI name 'java:FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2MCF'

      but while looking up the session bean did not lookup the rar it has given the name not found exception

      The jboss.xml file which is referring to this rar is :

      <jboss>
       <enterprise-beans>
       <session>
       <ejb-name>jcdFiletoFile1_File2</ejb-name>
       <jndi-name>ejb/local/stc/FiletoFile_PROJECTDeployment1/deployedServices/jcdFiletoFile1_File2</jndi-name>
       <resource-ref>
       <res-ref-name>FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2ConnectionFactory</res-ref-name>
       <jndi-name>FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2MCF</jndi-name>
       </resource-ref>
       </session>
       </enterprise-beans>
      </jboss>
      
      



      javax.naming.NamingException: Could not dereference object [ Root exception is javax.naming.NameNotFoundException: FiletoFile_PROJECTDeployment1_jcdFiletoFile1_File2MCF not bound ]
      at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:971)
      at