hi everyone
i am new to java and currently working on a project in jsp and ejb.
everytime i try to run the program i encounter an error that package javax.ejb does not exist.
i have jdk1.3 and j2sdkee 1.3 installed and have added j2ee.jar present in lib of j2sdkee in my classpath.my classpath is

C:\jdk1.3.0_05\lib\tools.jar;.;C:\Tomcat 4.1\common\lib\servlet.jar;C:\j2sdkee1.3\lib\j2ee.jar
i have also made a new environment variable j2ee_home with the value
C:\j2sdkee1.3\lib\j2ee.jar
please help

From what I know j2ee.jar is the one that contains these classes.
Can you run echo %CLASSPATH% in the same cmd window where you are able to reproduce the error and see it?
Also see this thread if it helps..
J2EE_HOME should point to the home dir (i.e. C:\j2sdkee1.3\) not a jar file.

From what I know j2ee.jar is the one that contains these classes.
Can you run echo %CLASSPATH% in the same cmd window where you are able to reproduce the error and see it?
Also see this thread if it helps..
J2EE_HOME should point to the home dir (i.e. C:\j2sdkee1.3\) not a jar file.

hey thanx for replying...i have already tried setting j2ee home to what u said and looked at that thread but still nothing is working

i am trying to run my ejb and jsp by apache tomcat 4.1

What was teh result of this -> " Can you run echo %CLASSPATH% in the same cmd window where you are able to reproduce the error and see it?"

What was teh result of this -> " Can you run echo %CLASSPATH% in the same cmd window where you are able to reproduce the error and see it?"

the result was:
C:\jdk1.3.0_05\lib\tools.jar;.;C:\Tomcat 4.1\common\lib\servlet.jar;C:\j2sdkee1.3\lib\j2ee.jar

and i am running myproject in apache tomcat...not on dos prompt

and i am running myproject in apache tomcat...not on dos prompt

Is the same classpath reported in cataline.out ?
If catalina.bat doesn't print the command it executes to start up, just add an echo in it before in ":execCmd" section just before execution.

If after this also the same classpath is reported there can't be anything else than the fact that none of the jar files in reported classpath contain javax classes ! So get the new ones. Or just reinstall your test machine from scratch if you have an image or something..

i dont think its gonna work that way
i am now trying to run it by j2ee server and not by tomcat server. but now i am getting new problem of no suitable driver to connect the jsp page or ejb to oracle....i am using sun.jdbc.odbc.jdbcodbc bridge driver but was getting the error
"Error java.sql.SQLException: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed " on the browser
and no suitable driver error in dos prompt

Changing your web serv coz you're facing problems with CLASSPATH isn't the thing I would do but if you want please go ahead..

You can't use EJBs in Tomcat as Tomcat is no EJB container.

Setting your classpath to include j2ee.jar (which is indeed the one you need, if you insist on using an ancient version of the spec) isn't going to do a thing to change that.
Not only wouldn't it work even if Tomcat picked it up because Tomcat can't run EJBs, but Tomcat is a sensible application and will set its own classpath in its startup script.

This article has been dead for over six months. Start a new discussion instead.