Topic
4 replies Latest Post - ‏2005-08-29T23:53:50Z by SystemAdmin
SystemAdmin
SystemAdmin
1479 Posts
ACCEPTED ANSWER

Pinned topic problem with look up (jndi)for local home in RAD 6.0

‏2005-05-25T11:12:54Z |
Hi
I have following problem while performing lookup for local home reference
I created local refrerence, code in ejb-jar.xml is like thi
<ejb-local-ref id="EJBLocalRef_1116950474578">
<description>Lookup for Local Home</description>
<ejb-ref-name>ejb/AddClientManagementLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home> com.adp.cssi.blogic.interfaces.AddClientManagementLocalHome
</local-home>
<local> com.adp.cssi.blogic.interfaces.AddClientManagementLocal </local>
<ejb-link>AddClientManagement</ejb-link>
</ejb-local-ref>

in web.xml code is like this
<ejb-local-ref id="EJBLocalRef_1116952043843">
<description>Add client management local home reference </description>
<ejb-ref-name>ejb/AddClientManagementLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home> com.adp.cssi.blogic.interfaces.AddClientManagementLocalHome
</local-home>
<local> com.adp.cssi.blogic.interfaces.AddClientManagementLocal </local>
<ejb-link>EJBProject.jar#AddClientManagement</ejb-link>
</ejb-local-ref>

my referring code is like this
InitialContext ic=new InitialContext();
Object obj=ic.lookup("java:comp/env/ejb/AddClientManagementLocal");
addClientLocalHome=(com.adp.cssi.blogic.interfaces.AddClientManagementLocalHome)(obj);

but still i am getting the warning and excetption as follows
W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/ejb/AddClientManagementLocal" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="local:ejb/AddClientManagementLocal"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.NameNotFoundException: Name "ejb/AddClientManagementLocal" not found in context "local:".
at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1074)
at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:985)..........
please tell me what i have to do to recognise this
Thanku
Santha
Updated on 2005-08-29T23:53:50Z at 2005-08-29T23:53:50Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1479 Posts
    ACCEPTED ANSWER

    Re: problem with look up (jndi)for local home in RAD 6.0

    ‏2005-07-15T20:06:36Z  in response to SystemAdmin
    Santha,
    Were you able to resolve this problem. I am encountering a similar one but with one wrinkle - WebSphere is prepending ejb/ to my jndi name. An example:
    From the ejb-jar:
    <ejb-local-ref id="EJBLocalRef_1121451159018">
    <ejb-ref-name>com.mcnichols.mserve.service.MessageProducerServiceLocalHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.mcnichols.mserve.service.MessageProducerServiceLocalHome</local-home>
    <local>com.mcnichols.mserve.service.MessageProducerServiceLocal</local>
    <ejb-link>MessageProducerService</ejb-link>
    </ejb-local-ref>

    From the bindings file:
    <ejbBindings xmi:id="EnterpriseBeanBinding_1105734046888" jndiName="ejb/ProductLineService">
    <enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#ProductLineService"/>
    <ejbRefBindings xmi:id="EjbRefBinding_1121451159018" jndiName="ejb/MessageProducerServiceLocal">
    <bindingEjbRef xmi:type="common:EJBLocalRef" href="META-INF/ejb-jar.xml#EJBLocalRef_1121451159018"/>
    </ejbRefBindings>
    </ejbBindings>

    The exception states that the lookup failure is using:
    jndiName="ejb/ejb/MessageProducerServiceLocal">
    • SystemAdmin
      SystemAdmin
      1479 Posts
      ACCEPTED ANSWER

      Re: problem with look up (jndi)for local home in RAD 6.0

      ‏2005-07-16T08:54:10Z  in response to SystemAdmin
      Hi
      Yes, Sometimes i am getting this problem..
      I dont know exact reason.. but whenever i got this..
      i am doing some sequence of refreshing like..
      Delete the jndis created
      once refresh the workspace(possible clean the project run--clean)
      next create the jndis again
      and start the server(restart ur project)
      may be solve ur problem

      may be experience people working on rad 6.0 knows exact problem..

      may be any one knows the solution can post the answer
      Thanks in advance
      santha
      • SystemAdmin
        SystemAdmin
        1479 Posts
        ACCEPTED ANSWER

        Re: problem with look up (jndi)for local home in RAD 6.0

        ‏2005-07-18T10:38:25Z  in response to SystemAdmin
        I finally just decided to delete the beans, references, close RAD, reboot, etc. and start over. Of course, this time everything worked - very frustating...
        Thanks for your reply.
  • SystemAdmin
    SystemAdmin
    1479 Posts
    ACCEPTED ANSWER

    Re: problem with look up (jndi)for local home in RAD 6.0

    ‏2005-08-29T23:53:50Z  in response to SystemAdmin
    I am having the same problem. Were you able to fix this problem.

    Thanks,

    Bob