Try "java:comp/env/fungi".
             ^

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of McLain, Mark
Sent: Wednesday, October 04, 2000 11:57 AM
To: Orion-Interest
Subject: Lookup of Orion-based EJB from Tomcat-based servlet
("java:comp/env namespace is only available from within the J2EE
environment")


NOTE:  This is a repost.  The message now includes a subject (oops!) and
more detail.

A coworker and I are trying to create a servlet that will run on his
computer under Tomcat.  This servlet is attempting to lookup and use an EJB
deployed on my computer under Orion.  This servlet is using the
com.evermind.server.ApplicationInitialContextFactory.

When the servlet performs the context object's lookup method (using the
String literal "java:com/env/fungi"), we get the following exception
displayed on his computer:

        "Exception: javax.naming.NamingException:  java:comp/env namespace
is only available from within the J2EE environment ."

A command-line client application run on the same coworker's computer IS
able to successfully lookup the same EJB on my computer using the
"java:com/env/fungi" String literal.  This command-line client is using the
com.evermind.server.ApplicationClientInitialContextFactory.

We have been unable to find any documentation about the NamingException
described above.

Please, would someone explain reasons we might be getting this exception
and/or the proper way to access an Orion EJB from a Tomcat servlet?  We
would appreciate any assistance that can be given.

Thank you.

Mark McLain
Systems Developer
Sybron Laboratory Products Corporation




Reply via email to