Did'nt work..

Santosh
----- Original Message -----
From: Montebove Luciano <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Thursday, November 23, 2000 1:18 PM
Subject: R: Calling EJB in Orion from Resin -Problem,


Substitute

         Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
with
         Object boundObject = context.lookup("java:comp/env/ejb/Hello");

Luciano


 -----Messaggio originale-----
Da: Santosh Kumar [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 22 novembre 2000 13.23
A: Orion-Interest
Oggetto: Calling EJB in Orion from Resin -Problem,


Hi All,

   I am onto an interesting task of using resin as the EJB client for Orion.
Everything seems to be in line but i dont know why i get this problem when
i run the orion-primer example EJB with the servlet part executing on the
RESIN.

javax.servlet.ServletException: Unable to get home interface:
javax.naming.NameNotFoundException: expected intermediate context in
`ejb/HelloHome' at hello.web.HelloServlet.init(HelloServlet.java:47) at
com.caucho.server.http.Application.loadServlet(Application.java:1504) at
com.caucho.server.http.Invocation.service(Invocation.java:207) at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142) at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211) at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145) at
com.caucho.server.TcpConnection.run(TcpConnection.java:139) at
java.lang.Thread.run(Thread.java:484)
Servlet code:
public void init(ServletConfig config) throws ServletException {
      // Get the initial JNDI context using our settings
      Context context;
      try {
         context = new InitialContext();
      }
      catch (Throwable exception) {
         throw new ServletException(
            "Unable to get initial JNDI context: " + exception.toString());
      }
      // Get a reference to the Hello home interface
      HelloHome helloHome;
      try {
         Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
         helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject,

HelloHome.class);
      }
      catch (Throwable exception) {
         throw new ServletException(
            "Unable to get home interface: " + exception.toString());
      }
WEB.xml (which resin specifies to add in its app)
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<classpath id='WEB-INF/classes/orion.jar'/>
<classpath id='WEB-INF/classes/mail.jar'/>
<classpath id='WEB-INF/classes/ejb.jar'/>
<jndi-link>
  <jndi-name>java:comp/env/ejb</jndi-name>
  <jndi-factory>com.evermind.server.rmi.RMIInitialContextFactory
  </jndi-factory>
  <init-param java.naming.provider.url="ormi://3.209.125.41/orion-primer"/>
  <init-param java.naming.security.principal="admin"/>
  <init-param java.naming.security.credentials="123"/>
</jndi-link>
</web-app>
at the orion side i have made this change(true -> false) in principal.xml (I
am not sure whether i should do this or not)
<user username="admin" password="123" deactivated="false">
   <description>The default administrator</description>
   <group-membership group="administrators" />
   <group-membership group="guests" />
   <group-membership group="users" />
  </user>
These are the only two things that i have done ..What i dont understand is
why am i getting this error
Unable to get home interface:
javax.naming.NameNotFoundException: expected intermediate context in
`ejb/HelloHome'


I think there is some problem in which the initialcontext is set..probably i
should
modify the way  InitialContext is set..


Please Help me!!!


Regards,
Santosh.

===========================================================================
=  Santosh Kumar C                                                        =
=  Senior Systems Engineer                                                =
=  Wipro Technologies                                                     =
=  1-8-448, Laxmi Building, S.P. Road,                                    =
=  Begumpet, Secunderabad - 500 003                                       =
=  A.P, India.                                                            =
=  Phone@: 91407896008 Ext 4511                                           =
=  Fax  @: 91407896123                                                    =
=  eMail@:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
=
=  url  @:  <http://www.wipro.com> http://www.wipro.com
=
=  The World's First SEI CMM Level 5 Software Services Company            =
===========================================================================



Reply via email to