This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

j2ee classpath  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What should be added to classpath to fix this?
My classpath does not have the right directories, as shown:
(1) The same TimeS.java file compiles on one machine and does not compile on a second machine. The classpath is :
set CLASSPATH=C:\J2SDKEE1.3\LIB;C:\jdk1.3.0_02\jre\lib;C:\jdk1.3.0_02\lib;.
Why does it compile on 1 machine and does not compile on another?
C:\orion\default-web-app\WEB-INF\classes>javac -classpath %CPATH% TimeS.java
TimeS.java:26: package javax.servlet does not exist
import javax.servlet.*;
^
TimeS.java:27: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
(2) C:\WINDOWS>j2ee -verbose
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/server/J2EEServer
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Sarah,
Actually, U must include the j2ee.jar file explicitly in the classpath. As far as I know, the jar files must be explicitly included into the classpath.
Just try this and see if it works. It must.
Bye...
Regards,
Shibs
 
Shibin Raghavan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Sarah,
Actually, U must include the j2ee.jar file explicitly in the classpath. As far as I know, the jar files must be explicitly included into the classpath.
Just try this and see if it works. It must.
Bye...
Regards,
Shibs
 
Sarah Smith
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
classpath has missed something serious because I cannot use any package under javax.*, including ejb, servlets, etc.... !
j2ee -verbose starts with error:
-----------------------------------
set CPATH=C:\j2sdkee1.2.1\LIB;C:\j2sdkee1.2.1\LIB\j2ee.jar;C:\jdk1.3.0_02\jre\lib;C:\jdk1.3.0_02\lib;.
set CLASSPATH=C:\j2sdkee1.2.1\LIB;C:\j2sdkee1.2.1\LIB\j2ee.jar;C:\jdk1.3.0_02\jre\lib;C:\jdk1.3.0_02\lib;.
set PATH=C:\j2sdkee1.2.1\bin;C:\j2sdkee1.2.1;C:\jdk1.3.0_02\bin;C:\jdk1.3.0_02;C:\jdk1.3.0_02\jre\bin;C:\j2sdkee1.2.1\LIB;%PATH%;.
set JAVA_HOME=C:\jdk1.3.0_02
set J2EE_HOME=C:\j2sdkee1.2.1
AFter setting the above variables, I get:
C:\>j2ee -verbose

J2EE server Listen Port: = 1049
No local string for j2ee.naming
Naming service started: :1050
java.io.InvalidClassException: com.sun.enterprise.activation.RepositoryImpl; Loc
al class not compatible: stream classdesc serialVersionUID=-7795687968735606752
local class serialVersionUID=-1818859733276416815
No local string for repository.imr_read
Unable to read server repository!
org.omg.CORBA.INITIALIZE: minor code: 3001 completed: No
at com.sun.enterprise.activation.RepositoryImpl.<init>(RepositoryImpl.ja
va:72)
at com.sun.enterprise.server.J2EEServer.createActivationObjects(J2EEServ
er.java:385)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:248)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:866)
java.lang.RuntimeException:
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:348)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:866)
J2EE server reported the following error:
Error executing J2EE server ...
C:\>

------------------------------
What is the classpath missing?
: )
thanks
-Sarah
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I think that the problem is with using Jdk 1.3 and J2EE 1.2, you can probally solve the problem by using JDK1.2.
I had exactly the same problem when I was using J2ee 1.3 and JDK 1.2.
My sugession is really a wild one , but u can still try it out
Vivek
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything uses jdk1.2 and j2ee 1.2, and I still cannot access any classes living under javax.*.* or run j2ee -verbose. Some thing is missing from the class path, because javac cannot recognize servlets, or EJB, or anything under javax.*
please help! Thank you
C:\WINDOWS>set CPATH=C:\jdk1.2.2;C:\j2sdkee1.2.1\LIB;C:\j2sdkee1.2.1\LIB\j2ee.ja
r;C:\j2sdkee1.2.1\lib\ejb10deployment.jar;C:\jdk1.2.2\jre\
C:\WINDOWS>set CLASSPATH=C:\jdk1.2.2;C:\j2sdkee1.2.1\LIB;C:\j2sdkee1.2.1\LIB\j2e
e.jar;C:\j2sdkee1.2.1\lib\ejb10deployment.jar;C:\jdk1.2.2\
C:\WINDOWS>
C:\WINDOWS>set PATH=C:\j2sdkee1.2.1\bin;C:\j2sdkee1.2.1;C:\j2sdkee1.2.1\LIB;C:\j
dk1.2.2\bin;C:\jdk1.2.2;C:\jdk1.2.2\jre\bin;%PATH%;.
C:\WINDOWS>
C:\WINDOWS>set JAVA_HOME=C:\jdk1.2.2
C:\WINDOWS>
C:\WINDOWS>set J2EE_HOME=C:\j2sdkee1.2.1
C:\WINDOWS>
C:\WINDOWS>j2ee -verbose

J2EE server Listen Port: = 1049
No local string for j2ee.naming
Naming service started: :1050
java.io.InvalidClassException: com.sun.enterprise.activation.RepositoryImpl; Loc
al class not compatible: stream classdesc serialVersionUID=-7795687968735606752
local class serialVersionUID=-1818859733276416815
No local string for repository.imr_read
Unable to read server repository!
org.omg.CORBA.INITIALIZE: minor code: 3001 completed: No
at com.sun.enterprise.activation.RepositoryImpl.<init>(RepositoryImpl.ja
va:72)
at com.sun.enterprise.server.J2EEServer.createActivationObjects(J2EEServ
er.java:385)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:248)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:866)
java.lang.RuntimeException:
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:348)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:866)
J2EE server reported the following error:
Error executing J2EE server ...
C:\WINDOWS>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!