From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NfhFZ-0000Jt-1P for garchives@archives.gentoo.org; Thu, 11 Feb 2010 22:11:05 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 662C0E0B32; Thu, 11 Feb 2010 22:10:14 +0000 (UTC) Received: from mta4.srv.hcvlny.cv.net (mta4.srv.hcvlny.cv.net [167.206.4.199]) by pigeon.gentoo.org (Postfix) with ESMTP id 4526BE0B32 for ; Thu, 11 Feb 2010 22:10:14 +0000 (UTC) Received: from [192.168.0.4] (ool-43505ef2.dyn.optonline.net [67.80.94.242]) by mta4.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0KXP00FLB6WVQW70@mta4.srv.hcvlny.cv.net> for gentoo-user@lists.gentoo.org; Thu, 11 Feb 2010 17:10:10 -0500 (EST) Date: Thu, 11 Feb 2010 17:10:06 -0500 From: dhk Subject: Re: [gentoo-user] Keyword for dev-java/sun-j2ee In-reply-to: <201002112231.15933.alan.mckinnon@gmail.com> To: gentoo-user@lists.gentoo.org Message-id: <4B74803E.8060408@optonline.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.7 References: <4B7403FD.8050208@optonline.net> <4B7431F2.5010502@optonline.net> <4B74635A.9040205@optonline.net> <201002112231.15933.alan.mckinnon@gmail.com> User-Agent: Thunderbird 2.0.0.23 (X11/20091004) X-Archives-Salt: 6f016ddb-4c45-4214-92a6-405a10429fd8 X-Archives-Hash: 99d86240d684e315b59686422a591f3c Alan McKinnon wrote: > On Thursday 11 February 2010 22:06:50 dhk wrote: >> Another question about this. >> >> Where's a good place to set J2EE_HOME (/opt/sun-j2ee-1.3.1/) and >> JAVA_HOME? Should it be in each user's profile? If I wanted to set >> them globally for all users should they go in /etc/profile ? > > How many users use it? > > One? Put it in their profile. > Many? put it in the system profile. > > This is not a decision peculiar to j2ee, you must make the identical decision > for hundreds of packages - same principles apply. > > Or you could use the absurd method Sybase uses, but we won't go there now... > > >> Also when starting j2ee I get the following error. >> # /opt/sun-j2ee-1.3.1/bin/j2ee -verbose >> /opt/sun-j2ee-1.3.1/bin/j2ee: line 14: /opt/sun-j2ee-1.3.1//bin/java: No >> such file or directory >> >> Is there another java package I need to install? /bin/java doesn't exist. > > I'm not surprised. > > it's not /bin/java > it's /opt/sun-j2ee-1.3.1/bin/java > an entirely different thing. > > When I last played with j2ee, the package from Sun did not have a JVM, you had > to install that first. > > You probably need to install a jdk or jvm, which is odd as that should be a > DEPEND. > If you do have a jdk or jvm, you need a symlink: > > ln -s /usr/bin/java /opt/sun-j2ee-1.3.1/bin/java > > I think it's almost working. 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 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/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 . 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.(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.(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: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/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 . 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.(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.(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: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