1 |
Alan McKinnon wrote: |
2 |
> On Friday 12 February 2010 00:10:06 dhk wrote: |
3 |
> |
4 |
>> My /usr/bin/java was linked to run-java-tool, don't know what that is. |
5 |
>> # ll /usr/bin/java |
6 |
>> lrwxrwxrwx 1 root root 13 Feb 11 11:20 /usr/bin/java -> run-java-tool |
7 |
> |
8 |
> That's correct. It's a man-in-the-middle thing installed by the java |
9 |
> configurator, it makes life easy when switching between various java versions |
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 |
I put /usr/bin/java back the way it was. |
143 |
ln -s /usr/bin/run-java-tool /usr/bin/java |
144 |
|
145 |
I set the CLASSPATH, got it from java-config --runtime |
146 |
export CLASSPATH=$CLASSPATH:/opt/sun-jdk-1.6.0.18/jre/lib/resources.jar: |
147 |
/opt/sun-jdk-1.6.0.18/jre/lib/rt.jar:/opt/sun-jdk-1.6.0.18/jre/lib/jsse.jar: |
148 |
/opt/sun-jdk-1.6.0.18/jre/lib/jce.jar:/opt/sun-jdk-1.6.0.18/jre/lib/charsets.jar |
149 |
|
150 |
Is it safe to set the CLASSPATH as follows? |
151 |
export CLASSPATH=$CLASSPATH:`java-config --runtime` |
152 |
That seems to work too. |
153 |
|
154 |
I ran /opt/sun-j2ee-1.3.1/bin/j2ee and still got the errors. It |
155 |
definately looks like the CLASSPATH, but what should it be? |
156 |
|
157 |
# cat /opt/sun-j2ee-1.3.1/logs/dhcppc3/j2ee/j2ee/system.err |
158 |
|
159 |
|
160 |
Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11 |
161 |
17:57:05 EST 2010.. |
162 |
Using the Java HotSpot(TM) 64-Bit Server VM and the version number |
163 |
1.6.0_18 from Sun Microsystems Inc.. |
164 |
VM is using the classpath: |
165 |
/opt/sun-j2ee-1.3.1/lib/system/cloudscape.jar:/opt/sun-j2ee-1.3.1/lib/system/cloudutil.jar:/opt/sun-j2ee-1.3.1/lib/cloudscape/RmiJdbc.jar:/opt/sun-j2ee-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/jhall.jar |
166 |
. |
167 |
J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1. |
168 |
|
169 |
|
170 |
Exception in thread "main" java.lang.NoClassDefFoundError: |
171 |
com/sun/corba/se/internal/util/IdentityHashtable |
172 |
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87) |
173 |
at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935) |
174 |
at com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:895) |
175 |
at |
176 |
com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(TransientNameService.java:117) |
177 |
at |
178 |
com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNameService.java:70) |
179 |
at |
180 |
com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java:103) |
181 |
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226) |
182 |
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972) |
183 |
Caused by: java.lang.ClassNotFoundException: |
184 |
com.sun.corba.se.internal.util.IdentityHashtable |
185 |
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) |
186 |
at java.security.AccessController.doPrivileged(Native Method) |
187 |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) |
188 |
at java.lang.ClassLoader.loadClass(ClassLoader.java:307) |
189 |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) |
190 |
at java.lang.ClassLoader.loadClass(ClassLoader.java:248) |
191 |
... 8 more |
192 |
|
193 |
Thanks, |
194 |
|
195 |
dhk |