| Author |
Exception in thread "main"
|
Richard J Wallace
Greenhorn
Joined: Nov 26, 2004
Posts: 1
|
|
Help please! I've bought the Head First EJB book and keep getting the following exception when running j2ee.bat J2EE server listen port: 1050 Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/IdentityHashtable at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87) at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935) at com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:89 5) at com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(T ransientNameService.java:117) at com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(Trans ientNameService.java:70) at com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMg r.java:103) at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226) at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972) I've tried in vain to find the solution but no joy. I think it's probably a classpath issue so here's whats setup with them: CLASSPATHC:\j2sdkee1.3.1\lib\j2ee.jar J2EE_HOMEC:\j2sdkee1.3.1 JAVA_HOMEC:\jdk1.5.0 PATHC:\j2sdkee1.3.1\bin;C:\jdk1.5.0\bin
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
|
Note that the NoClassDefFoundError usually happens when the class was there when everything was compiler but is missing at runtime when it needs to be dynamically linked as the result of a method call or creation of a new object, for instance. Make sure your class path is correct.
|
SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
|
 |
albert ll
Greenhorn
Joined: Sep 22, 2005
Posts: 1
|
|
The problem is using wrong version of J2SE. use j2sdk1.4.2_09.
|
 |
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
|
|
albert II, Welcome to Javaranch, a friendly place for Java greenhorns We hope you are enjoying your stay here at Javaranch. We'd like you to modify your display name in order to comply with our naming policy. We thank you for your comprehension
|
 |
Veena Pointi
Ranch Hand
Joined: Jun 20, 2002
Posts: 442
|
|
|
Definitely IdentityHashtable class is part of j2ee.jar .Make sure you have correct version of j2se.
|
SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
|
 |
Tom Winfred
Greenhorn
Joined: Feb 28, 2010
Posts: 1
|
|
Error Message:
J2EE server listen port: 1080
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/IdentityHashtable
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87)
This is because "J2EE RI relies on Sun's J2SE for CORBA support". See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4761595
So in our case, this is a problem with the jdk or j2se used in the PATH
IdentityHashtable class
In jdk 1.5 IdentityHashtable.class is in "com.sun.corba.se.impl.util.IdentityHashtable" inside the rt.jar
In jdk 1.4 IdentityHashtable.class is in "com.sun.corba.se.internal.util.IdentityHashtable" inside the rt.jar <-- j2ee wants this one
The util.class in the j2ee.jar (j2ee lib folder) expects the IdentityHashtable class in "com.sun.corba.se.internal.util.IdentityHashtable".
But like me if you have been using jdk 1.5 in the Path/Classpath it cannot obviously find the class IdentityHashtable.
Solution is to use jdk 1.4 in the class path.
change JAVA_HOME=C:\SDKs\jdk1.5.0 to "JAVA_HOME=C:\SDKs\jdk 1.4.2_09"
|
 |
 |
|
|
subject: Exception in thread "main"
|
|
|