1 Reply Latest reply on May 14, 2004 2:31 AM by Juha Lindfors

    Jar file is deployed but not able to connect to JNDIServer o

    abhijit_durge Newbie

      Technologies used:
      Server: jboss-3.2.3
      Ant: 1.5
      xDoclet: 1.2

      ProductBean.jar is an Entity Bean(version 2.x) from Mastering EJB (Author: ED Roman).
      JNDI name in jboss.xml is ProductHome.
      LocalJNDI name in jboss.xml is ProductLocal

      Listing of jboss.xml generated by xDoclet is:


      <local-jndi-name>ProductLocal</local-jndi-name> <!-- I have even tried LocalProductHome -->


      ProductBean.jar is created with the help of Ant 1.5

      Generated File Structure:
      ProductBean.java (This file was implemented as required by me)

      The following tree was generated by xDoclet and Ant.

      target (folder)
      |-----classes (folder)
      | |--------mypack (package)
      | |--------------Product.class All files generated with the help of Ant
      | |--------------ProductBean.class
      | |--------------ProductCMP.class
      | |--------------ProductData.class
      | |--------------ProductHome.class
      | |--------------ProductLocal.class
      | |--------------ProductLocalHome.class
      | |--------------ProductPK.class
      | |--------------ProductUtil.class
      | |------contains javadocs
      | |--------mypack (package)
      | |--------------Product.java All files generated with the help of xDoclet
      | |--------------ProductCMP.java
      | |--------------ProductData.java
      | |--------------ProductHome.java
      | |--------------ProductLocal.java
      | |--------------ProductLocalHome.java
      | |--------------ProductPK.java
      | |--------------ProductUtil.java
      |--------------ejb-jar.xml (All generated by xDoclet)


      When ProductBean.jar file is Deployed on jboss it gives me following result.
      Starting deployment of package: file:/D:/jboss-3.2.3/server/default/deploy/ProductBean.jar
      INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.2.3/server/default/deploy/ProductBean.jar

      The problem is when I view the web-console or JNDIView of jmx-console, of jboss,
      it doesn't display the deployed ProductBean.jar in web-console
      and jmx-console->JNDIView->list operation doesn't display the "ProductHome" in the list.

      Moreover When I try to connect to the deployed ProductBean using a standalone application,
      I get an error as follows
      for eg:
      ProductHome not bound. (where ProductHome is the JNDI name I am looking in the JNDIServer of jboss
      from standalone application).

      I tried printing the initialContext and jboss gives me an initialContext object.
      Lookup is unsuccessful.

      How to solve the above problem.