1 |
On Friday 12 February 2010 00:10:06 dhk wrote: |
2 |
|
3 |
> My /usr/bin/java was linked to run-java-tool, don't know what that is. |
4 |
> # ll /usr/bin/java |
5 |
> lrwxrwxrwx 1 root root 13 Feb 11 11:20 /usr/bin/java -> run-java-tool |
6 |
|
7 |
That's correct. It's a man-in-the-middle thing installed by the java |
8 |
configurator, it makes life easy when switching between various java versions |
9 |
|
10 |
> |
11 |
> I installed a jdk |
12 |
> emerge dev-java/sun-jdk |
13 |
> |
14 |
> Removed the /usr/bin/java sym link and made another to the newly |
15 |
> installed java. |
16 |
> ln -s /opt/sun-jdk-1.6.0.18/bin/java /usr/bin/java |
17 |
> |
18 |
> I set some environment variables. |
19 |
> export J2EE_HOME="/opt/sun-j2ee-1.3.1/" |
20 |
> export JAVA_HOME="/opt/sun-jdk-1.6.0.18" |
21 |
> |
22 |
> Then reinstalled j2ee |
23 |
> emerge dev-java/sun-j2ee |
24 |
> |
25 |
> Tried starting j2ee |
26 |
> /opt/sun-j2ee-1.3.1/bin/j2ee -verbose |
27 |
> |
28 |
> Checked processes, but no j2ee was running. |
29 |
> |
30 |
> Then looked at the error log. Looks like it can't find this com.sun... |
31 |
> directory. |
32 |
> |
33 |
> # cat /opt/sun-j2ee-1.3.1/logs/dhcppc3/j2ee/j2ee/system.err |
34 |
> |
35 |
> |
36 |
> Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11 |
37 |
> 16:44:31 EST 2010.. |
38 |
> Using the Java HotSpot(TM) 64-Bit Server VM and the version number |
39 |
> 1.6.0_18 from Sun Microsystems Inc.. |
40 |
> VM is using the classpath: |
41 |
> /opt/sun-j2ee-1.3.1/lib/system/cloudscape.jar:/opt/sun-j2ee-1.3.1/lib/syste |
42 |
> m/cloudutil.jar:/opt/sun-j2ee-1.3.1/lib/cloudscape/RmiJdbc.jar:/opt/sun-j2e |
43 |
> e-1.3.1/lib/cloudscape/cloudclient.jar:/opt/sun-j2ee-1.3.1/lib/classes:/opt |
44 |
> /sun-j2ee-1.3.1/classes:/opt/sun-j2ee-1.3.1/lib/j2ee.jar:/opt/sun-j2ee-1.3. |
45 |
> 1/lib/toolclasses:/opt/sun-j2ee-1.3.1/lib/j2eetools.jar:/opt/sun-j2ee-1.3.1 |
46 |
> /lib/locale::/opt/sun-jdk-1.6.0.18/lib/tools.jar:/opt/sun-j2ee-1.3.1/lib/jh |
47 |
> all.jar . |
48 |
> J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1. |
49 |
> |
50 |
> |
51 |
> Exception in thread "main" java.lang.NoClassDefFoundError: |
52 |
> com/sun/corba/se/internal/util/IdentityHashtable |
53 |
|
54 |
If memory serves, the corba stuff is part of the base classes required by all |
55 |
VMs. I think that is in rt.jar, but you don't have that in your CLASSPATH. |
56 |
|
57 |
These days it might be elsewhere, it's been a while. |
58 |
|
59 |
I reckon you either didn't set your jdk CLASSPATH at all, or you did and |
60 |
clobbered it with j2ee by doing |
61 |
|
62 |
CLASSPATH=..... |
63 |
|
64 |
instead of |
65 |
|
66 |
CLASSPATH=$CLASSPATH:.... |
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
> at |
73 |
com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87) |
74 |
> at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935) |
75 |
> at |
76 |
com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:895) |
77 |
> at |
78 |
> com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(Transie |
79 |
> ntNameService.java:117) at |
80 |
> com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNa |
81 |
> meService.java:70) at |
82 |
> com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java |
83 |
> :103) at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226) |
84 |
> at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972) |
85 |
> Caused by: java.lang.ClassNotFoundException: |
86 |
> com.sun.corba.se.internal.util.IdentityHashtable |
87 |
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) |
88 |
> at java.security.AccessController.doPrivileged(Native Method) |
89 |
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) |
90 |
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307) |
91 |
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) |
92 |
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) |
93 |
> ... 8 more |
94 |
> |
95 |
> |
96 |
> Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11 |
97 |
> 17:03:04 EST 2010.. |
98 |
> Using the Java HotSpot(TM) 64-Bit Server VM and the version number |
99 |
> 1.6.0_18 from Sun Microsystems Inc.. |
100 |
> VM is using the classpath: |
101 |
> /opt/sun-j2ee-1.3.1/lib/system/cloudscape.jar:/opt/sun-j2ee-1.3.1/lib/syste |
102 |
> m/cloudutil.jar:/opt/sun-j2ee-1.3.1/lib/cloudscape/RmiJdbc.jar:/opt/sun-j2e |
103 |
> e-1.3.1/lib/cloudscape/cloudclient.jar:/opt/sun-j2ee-1.3.1/lib/classes:/opt |
104 |
> /sun-j2ee-1.3.1/classes:/opt/sun-j2ee-1.3.1/lib/j2ee.jar:/opt/sun-j2ee-1.3. |
105 |
> 1/lib/toolclasses:/opt/sun-j2ee-1.3.1/lib/j2eetools.jar:/opt/sun-j2ee-1.3.1 |
106 |
> /lib/locale::/opt/sun-jdk-1.6.0.18/lib/tools.jar:/opt/sun-j2ee-1.3.1/lib/jh |
107 |
> all.jar . |
108 |
> J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1. |
109 |
> |
110 |
> |
111 |
> Exception in thread "main" java.lang.NoClassDefFoundError: |
112 |
> com/sun/corba/se/internal/util/IdentityHashtable |
113 |
> at |
114 |
com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87) |
115 |
> at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935) |
116 |
> at |
117 |
com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:895) |
118 |
> at |
119 |
> com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(Transie |
120 |
> ntNameService.java:117) at |
121 |
> com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNa |
122 |
> meService.java:70) at |
123 |
> com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java |
124 |
> :103) at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226) |
125 |
> at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972) |
126 |
> Caused by: java.lang.ClassNotFoundException: |
127 |
> com.sun.corba.se.internal.util.IdentityHashtable |
128 |
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) |
129 |
> at java.security.AccessController.doPrivileged(Native Method) |
130 |
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) |
131 |
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307) |
132 |
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) |
133 |
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) |
134 |
> ... 8 more |
135 |
> |
136 |
> |
137 |
> Thanks, |
138 |
> |
139 |
> dhk |
140 |
|
141 |
-- |
142 |
alan dot mckinnon at gmail dot com |