Hi everyone,

        I developped a servlet that calls EJB components that are stored in an
Oracle 8.1.7 database.  When I run my servlet from Oracle JDeveloper, I can
call my EJB components without any problem.  When I deploy my servlet in
Tomcat 3.2.1 (on SunOS 5.6), I always get the following exception:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial.

        According to the Oracle docs, the java.naming.factory.initial doesn't have
to be set at all.

        I found a work around, but I really don't like it...  If I add all the jar
files used by my servlet, plus all the classes of my servlet in the system
CLASSPATH BEFORE I start Tomcat, the exception disappears:

export
CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/webapps/myapp/WEB-INF/classes:${TOMCAT
_HOME}/webapps/myapp/WEB-INF/lib/aurora_client.jar:${TOMCAT_HOME}/webapps/my
app/WEB-INF/lib/mts.jar:${TOMCAT_HOME}/webapps/myapp/WEB-INF/lib/vbjapp.jar:
${TOMCAT_HOME}/webapps/myapp/WEB-INF/lib/vbjorb.jar
${TOMCAT_HOME}/bin/startup.sh

        The BIG problem with this is that this way, I can only have one application
per web server without risking name conflicts between the classes of the
applications and this is not good at all in my current context.

Can anyone help me on this one???

Thanks in advance

  _____

Ghislain Gadbois
Analyst-Programmer

COGNICASE - SISCA

2144, King West, suite 240
Sherbrooke (Québec) J1J 2E8
Tel. : (819) 564-1199, ext 2225
Fax : (819) 569-8597
E-Mail : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to