我用的是j2sdkee1.3.1 ,安装目录为:C:\j2sdkee1.3.1 ;
环境变量配置:J2EE_HOME=C:\j2sdkee1.3.1
  PATH=C:\j2sdkee1.3.1\bin
  CLASSPATH=C:\j2sdkee1.3.1\lib\j2ee.jar
  JAVA_HOME=C:\Java\jdk1.6.0_10我输入下列命令启动J2EE
C:\j2sdkee1.3.1\bin>j2ee -verbose
出现错误:求解决方法
J2EE server listen port: 1050
Logging for J2EE Server Version: 1.3.1-b17 started at: Fri Feb 03 21:55:16 CST 2012..
Using the Java HotSpot(TM) Client VM and the version number 1.6.0_10-rc2 from Sun Microsystems Inc..
VM is using the classpath: C:\j2sdkee1.3.1\lib\system\cloudscape.jar;C:\j2sdkee1.3.1\lib\system\tools.jar;C:\j2sdkee1.3.1\lib\cloudscape\RmiJdbc.jar;C:\j2sdkee1.3.1\lib\cloudscape\cloudclient.jar;C:\j2sdkee1.3.1\lib\classes;C:\j2sdkee1.3.1\classes;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib\toolclasses;C:\j2sdkee1.3.1\lib\j2eetools.jar;C:\j2sdkee1.3.1\lib\locale;;C:\Java\jdk1.6.0_10\lib\tools.jar;C:\j2sdkee1.3.1\lib\jhall.jar .
J2EE Home Directory has been set to: C:\j2sdkee1.3.1.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:895)
at com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(TransientNameService.java:117)
at com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNameService.java:70)
at com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java:103)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
Caused by: java.lang.ClassNotFoundException: com.sun.corba.se.internal.util.IdentityHashtable
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 8 more

解决方案 »

  1.   

    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"  可能你用的1.6的jdk的是这个com.sun.corba.se.impl.util.IdentityHashtable
    而你需要的是 com/sun/corba/se/internal/util/IdentityHashtable
    这就能解决你的问题。。参考:http://http://www.coderanch.com/t/160167/java-EJB-SCBCD/certification/Exception-thread-main
      

  2.   

    参考:http://www.coderanch.com/t/160167/java-EJB-SCBCD/certification/Exception-thread-main
      

  3.   

    那我是不是要换一个低版本的JDK呢?