On Friday 12 February 2010 00:10:06 dhk wrote: > My /usr/bin/java was linked to run-java-tool, don't know what that is. > # ll /usr/bin/java > lrwxrwxrwx 1 root root 13 Feb 11 11:20 /usr/bin/java -> run-java-tool
That's correct. It's a man-in-the-middle thing installed by the java configurator, it makes life easy when switching between various java versions > > I installed a jdk > emerge dev-java/sun-jdk > > Removed the /usr/bin/java sym link and made another to the newly > installed java. > ln -s /opt/sun-jdk-1.6.0.18/bin/java /usr/bin/java > > I set some environment variables. > export J2EE_HOME="/opt/sun-j2ee-1.3.1/" > export JAVA_HOME="/opt/sun-jdk-1.6.0.18" > > Then reinstalled j2ee > emerge dev-java/sun-j2ee > > Tried starting j2ee > /opt/sun-j2ee-1.3.1/bin/j2ee -verbose > > Checked processes, but no j2ee was running. > > Then looked at the error log. Looks like it can't find this com.sun... > directory. > > # cat /opt/sun-j2ee-1.3.1/logs/dhcppc3/j2ee/j2ee/system.err > > > Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11 > 16:44:31 EST 2010.. > Using the Java HotSpot(TM) 64-Bit Server VM and the version number > 1.6.0_18 from Sun Microsystems Inc.. > VM is using the classpath: > /opt/sun-j2ee-1.3.1/lib/system/cloudscape.jar:/opt/sun-j2ee-1.3.1/lib/syste > m/cloudutil.jar:/opt/sun-j2ee-1.3.1/lib/cloudscape/RmiJdbc.jar:/opt/sun-j2e > e-1.3.1/lib/cloudscape/cloudclient.jar:/opt/sun-j2ee-1.3.1/lib/classes:/opt > /sun-j2ee-1.3.1/classes:/opt/sun-j2ee-1.3.1/lib/j2ee.jar:/opt/sun-j2ee-1.3. > 1/lib/toolclasses:/opt/sun-j2ee-1.3.1/lib/j2eetools.jar:/opt/sun-j2ee-1.3.1 > /lib/locale::/opt/sun-jdk-1.6.0.18/lib/tools.jar:/opt/sun-j2ee-1.3.1/lib/jh > all.jar . > J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1. > > > Exception in thread "main" java.lang.NoClassDefFoundError: > com/sun/corba/se/internal/util/IdentityHashtable If memory serves, the corba stuff is part of the base classes required by all VMs. I think that is in rt.jar, but you don't have that in your CLASSPATH. These days it might be elsewhere, it's been a while. I reckon you either didn't set your jdk CLASSPATH at all, or you did and clobbered it with j2ee by doing CLASSPATH=..... instead of CLASSPATH=$CLASSPATH:.... > 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(Transie > ntNameService.java:117) at > com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNa > meService.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:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > ... 8 more > > > Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11 > 17:03:04 EST 2010.. > Using the Java HotSpot(TM) 64-Bit Server VM and the version number > 1.6.0_18 from Sun Microsystems Inc.. > VM is using the classpath: > /opt/sun-j2ee-1.3.1/lib/system/cloudscape.jar:/opt/sun-j2ee-1.3.1/lib/syste > m/cloudutil.jar:/opt/sun-j2ee-1.3.1/lib/cloudscape/RmiJdbc.jar:/opt/sun-j2e > e-1.3.1/lib/cloudscape/cloudclient.jar:/opt/sun-j2ee-1.3.1/lib/classes:/opt > /sun-j2ee-1.3.1/classes:/opt/sun-j2ee-1.3.1/lib/j2ee.jar:/opt/sun-j2ee-1.3. > 1/lib/toolclasses:/opt/sun-j2ee-1.3.1/lib/j2eetools.jar:/opt/sun-j2ee-1.3.1 > /lib/locale::/opt/sun-jdk-1.6.0.18/lib/tools.jar:/opt/sun-j2ee-1.3.1/lib/jh > all.jar . > J2EE Home Directory has been set to: /opt/sun-j2ee-1.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(Transie > ntNameService.java:117) at > com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNa > meService.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:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > ... 8 more > > > Thanks, > > dhk -- alan dot mckinnon at gmail dot com