getting javax.naming.LinkException in when using JNDI in EJB

I have deployed my application in weblogic, it is ejb application using JNDI when I am running the jsp page I am getting the error:
javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: While trying to lookup

In web.xml I have  Ejb references and in my ear i have my ejb-jar and other descriptors
ramadevimandalaAsked:
Who is Participating?
 
ramadevimandalaConnect With a Mentor Author Commented:
got the solution , actually I am deploying my ejb jar in different application remotly changed it to home then it working fine .. Thank you
0
 
Gibu GeorgeCTOCommented:
Post the code which you are using for lookup
0
 
ramadevimandalaAuthor Commented:

This the code in my web.xml
<ejb-ref>
    <ejb-ref-name>test/metadata</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>ServiceRemote</remote>
   <ejb-link>bean </ejb-link>
  </ejb-ref>
 
 
  <ejb-ref>
    <ejb-ref-name>test/runtime</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <remote>RuntimeRemote</remote>
<ejb-link>bean</ejb-link>
  </ejb-ref>

Open in new window

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ramadevimandalaAuthor Commented:
This is my weblogic.xml
<ejb-reference-description>
  <ejb-ref-name>test/metadata</ejb-ref-name>
   <jndi-name>jndiname/remote/metadata</jndi-name>
  </ejb-reference-description>
 
 
 
  <ejb-reference-description>
    <ejb-ref-name>test/runtime</ejb-ref-name>
    <jndi-name>jndiname/remote/runtime</jndi-name> 
      </ejb-reference-description> 

Open in new window

0
 
Gibu GeorgeCTOCommented:
the java code please
0
 
ramadevimandalaAuthor Commented:
I don't have java code , as its there in framework which i can't have access, just tell me what can be the root cause for this error
0
All Courses

From novice to tech pro — start learning today.