Gentoo Archives: gentoo-user

From: dhk <dhkuhl@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Keyword for dev-java/sun-j2ee
Date: Thu, 11 Feb 2010 22:11:05
Message-Id: 4B74803E.8060408@optonline.net
In Reply to: Re: [gentoo-user] Keyword for dev-java/sun-j2ee by Alan McKinnon
1 Alan McKinnon wrote:
2 > On Thursday 11 February 2010 22:06:50 dhk wrote:
3 >> Another question about this.
4 >>
5 >> Where's a good place to set J2EE_HOME (/opt/sun-j2ee-1.3.1/) and
6 >> JAVA_HOME? Should it be in each user's profile? If I wanted to set
7 >> them globally for all users should they go in /etc/profile ?
8 >
9 > How many users use it?
10 >
11 > One? Put it in their profile.
12 > Many? put it in the system profile.
13 >
14 > This is not a decision peculiar to j2ee, you must make the identical decision
15 > for hundreds of packages - same principles apply.
16 >
17 > Or you could use the absurd method Sybase uses, but we won't go there now...
18 >
19 >
20 >> Also when starting j2ee I get the following error.
21 >> # /opt/sun-j2ee-1.3.1/bin/j2ee -verbose
22 >> /opt/sun-j2ee-1.3.1/bin/j2ee: line 14: /opt/sun-j2ee-1.3.1//bin/java: No
23 >> such file or directory
24 >>
25 >> Is there another java package I need to install? /bin/java doesn't exist.
26 >
27 > I'm not surprised.
28 >
29 > it's not /bin/java
30 > it's /opt/sun-j2ee-1.3.1/bin/java
31 > an entirely different thing.
32 >
33 > When I last played with j2ee, the package from Sun did not have a JVM, you had
34 > to install that first.
35 >
36 > You probably need to install a jdk or jvm, which is odd as that should be a
37 > DEPEND.
38 > If you do have a jdk or jvm, you need a symlink:
39 >
40 > ln -s /usr/bin/java /opt/sun-j2ee-1.3.1/bin/java
41 >
42 >
43
44 I think it's almost working.
45
46 My /usr/bin/java was linked to run-java-tool, don't know what that is.
47 # ll /usr/bin/java
48 lrwxrwxrwx 1 root root 13 Feb 11 11:20 /usr/bin/java -> run-java-tool
49
50 I installed a jdk
51 emerge dev-java/sun-jdk
52
53 Removed the /usr/bin/java sym link and made another to the newly
54 installed java.
55 ln -s /opt/sun-jdk-1.6.0.18/bin/java /usr/bin/java
56
57 I set some environment variables.
58 export J2EE_HOME="/opt/sun-j2ee-1.3.1/"
59 export JAVA_HOME="/opt/sun-jdk-1.6.0.18"
60
61 Then reinstalled j2ee
62 emerge dev-java/sun-j2ee
63
64 Tried starting j2ee
65 /opt/sun-j2ee-1.3.1/bin/j2ee -verbose
66
67 Checked processes, but no j2ee was running.
68
69 Then looked at the error log. Looks like it can't find this com.sun...
70 directory.
71
72 # cat /opt/sun-j2ee-1.3.1/logs/dhcppc3/j2ee/j2ee/system.err
73
74
75 Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11
76 16:44:31 EST 2010..
77 Using the Java HotSpot(TM) 64-Bit Server VM and the version number
78 1.6.0_18 from Sun Microsystems Inc..
79 VM is using the classpath:
80 /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
81 .
82 J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1.
83
84
85 Exception in thread "main" java.lang.NoClassDefFoundError:
86 com/sun/corba/se/internal/util/IdentityHashtable
87 at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87)
88 at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935)
89 at com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:895)
90 at
91 com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(TransientNameService.java:117)
92 at
93 com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNameService.java:70)
94 at
95 com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java:103)
96 at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226)
97 at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
98 Caused by: java.lang.ClassNotFoundException:
99 com.sun.corba.se.internal.util.IdentityHashtable
100 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
101 at java.security.AccessController.doPrivileged(Native Method)
102 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
103 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
104 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
105 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
106 ... 8 more
107
108
109 Logging for J2EE Server Version: 1.3.1-b17 started at: Thu Feb 11
110 17:03:04 EST 2010..
111 Using the Java HotSpot(TM) 64-Bit Server VM and the version number
112 1.6.0_18 from Sun Microsystems Inc..
113 VM is using the classpath:
114 /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
115 .
116 J2EE Home Directory has been set to: /opt/sun-j2ee-1.3.1.
117
118
119 Exception in thread "main" java.lang.NoClassDefFoundError:
120 com/sun/corba/se/internal/util/IdentityHashtable
121 at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.<clinit>(Util.java:87)
122 at com.sun.corba.ee.internal.POA.POAImpl.activate(POAImpl.java:935)
123 at com.sun.corba.ee.internal.POA.POAImpl.activate_object(POAImpl.java:895)
124 at
125 com.sun.corba.ee.internal.CosNaming.TransientNameService.initialize(TransientNameService.java:117)
126 at
127 com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(TransientNameService.java:70)
128 at
129 com.sun.enterprise.iiop.POAProtocolMgr.initializeNaming(POAProtocolMgr.java:103)
130 at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:226)
131 at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
132 Caused by: java.lang.ClassNotFoundException:
133 com.sun.corba.se.internal.util.IdentityHashtable
134 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
135 at java.security.AccessController.doPrivileged(Native Method)
136 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
137 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
138 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
139 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
140 ... 8 more
141
142
143 Thanks,
144
145 dhk

Replies

Subject Author
Re: [gentoo-user] Keyword for dev-java/sun-j2ee Alan McKinnon <alan.mckinnon@×××××.com>