• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun RI, NoClassDefFoundError

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thought this would be easy to resolve. Must be missing something. Am getting "NoClassDefFoundError: com/sun/corba/se/internal/util/IdentityHashtable" when trying to start Sun RI (j2ee -verbose). Classpath *seems* to be fine...

classpath=.;d:\tools\java\j2sdkee1.3.1\lib\j2ee.jar;d:\tools\java\apache-ant-1.6.2\lib\ant.jar;d:\to
ols\java\apache-ant-1.6.2\lib\jaxp.jar;d:\tools\java\jdk1.5.0\jre\lib\rt.jar;d:\tools\java\jdk1.5.0\
lib\tools.jar;

Other environ vars look good:

J2EE_HOME=d:\tools\java\j2sdkee1.3.1
Directory of d:\tools\java\j2sdkee1.3.1\lib
01/17/2002 03:52a 6,809,949 j2ee.jar

JAVA_HOME=d:\tools\java\jdk1.5.0
Directory of d:\tools\java\jdk1.5.0\jre\lib
10/19/2004 02:00p 37,557,654 rt.jar
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that my use of jdk 1.5 was the issue. IdentityHashtable is in a different package in rt.jar in 1.5. Downloaded 1.4.2, inspected its jre/lib/rt.jar, switched java_home and the RI server started up fine.
 
Jonny Andersson
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This post saved me time! : )

And to save a lot of time for others that are trying to start the server on Windows as described in the book Head First EJB at pae 31 ...

Read at page xxiv again ... the spec guarantees ONLY J2SE 1.3 support.(You might be tested on that!).

Download J2SE 1.3 (JDK) from java.sun.com/j2se/1.3/download.html and install it to for example \Java\jdk1.3.1_16. Don�t install to some directory below "Program Files"! The space in "Program Files" will cause you problem! And yeaa, download this quickly to be safe because Sun has begun its End of Life proces for this download : )

Download J2EE 1.3 from java.sun.com/j2ee/1.3/download.html and install it to for example \Java\j2sdkee1.3.1. Again, don�t install to some directory below "Program Files" because the space in "Program Files" will cause you problem!

Add an environment variable JAVA_HOME=Your JDK installation directory, for example JAVA_HOME=C:\Java\jdk1.3.1_16. If you like me have also have or want to have J2SE (JDK) 5.0 installed somewhere else, probably at something like Program Files\Java\jdk1.5.0_06, you may set your JAVA_HOME environment variable to this directory and edit the file Java\j2sdkee1.3.1\bin\userconfig.bat so that the JAVA_HOME in that file have the path to your JDK 1.3 directory for your J2EE excercises.

And at the last, add an environment variable J2EE_HOME=Your JDK installation directory, for example J2EE=C:\Java\j2sdkee1.3.1.

No should your server start as described in the book Head First EJB at pae 31.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This post saved me time!


best thing heard all day! glad it helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic