Two ponints to cosider.
 
1) Are you deploying EJB and servlets under same application?  My guess is you are trying to use default servlet context then did you deploy the EJB in application.xml?
 
2) Is your JNDI name of the EJB is matching with the ejb-ref name in the web-xml?
 

Kesav Kumar Kolla
Voquette Inc
650 356 3740(W)
510 889 6840(R)
Voquette....Delivering Sound Information

-----Original Message-----
From: ZHotmail [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 8:00 AM
To: Orion-Interest
Subject: Calling a EJB application with in the Default servlet Context

Hi ,
 
I have a simple Hello world EJB is deployed in my orion server  and now i want to access this application ,
 
I have written a Servlet client for accessing this application , I want to put this servlet in the default servlet context i.e /servlet/HelloServlet , I do not want to create a war file and deploy part of the EAR file, I copied my Remote and class jar file to the web-inf\lib directory ,
 
However when trying to acess it I got the error ,
 

javax.naming.NamingException: Error instantiating web-app JNDI-context: No locat
ion specified and no suitable instance of the type 'Hello' found for the ejb-ref
 ejb/HelloHome
        at com.evermind.server.http.HttpApplication.getEnvironmentContext(HttpAp
plication.java:5686)
        at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java
:104)
        at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java
:63)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at HelloServlet.doGet(HelloServlet.java:28)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:501)
        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:170)
        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:576)
        at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:189)
        at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
in doGet
 

I thought this must me very simple , Am I missing some thing here.
 
Ravi Prasad

 

Reply via email to