public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: dhk <dhkuhl@optonline.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Keyword for dev-java/sun-j2ee
Date: Thu, 11 Feb 2010 17:58:52 -0500	[thread overview]
Message-ID: <4B748BAC.5010600@optonline.net> (raw)
In-Reply-To: <201002120020.27672.alan.mckinnon@gmail.com>

Alan McKinnon wrote:
> 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
> 

I put /usr/bin/java back the way it was.
ln -s /usr/bin/run-java-tool /usr/bin/java

I set the CLASSPATH, got it from java-config --runtime
export CLASSPATH=$CLASSPATH:/opt/sun-jdk-1.6.0.18/jre/lib/resources.jar:
/opt/sun-jdk-1.6.0.18/jre/lib/rt.jar:/opt/sun-jdk-1.6.0.18/jre/lib/jsse.jar:
/opt/sun-jdk-1.6.0.18/jre/lib/jce.jar:/opt/sun-jdk-1.6.0.18/jre/lib/charsets.jar

Is it safe to set the CLASSPATH as follows?
export CLASSPATH=$CLASSPATH:`java-config --runtime`
That seems to work too.

I ran /opt/sun-j2ee-1.3.1/bin/j2ee and still got the errors.  It
definately looks like the CLASSPATH, but what should it be?

# 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
17:57:05 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.<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(TransientNameService.java:117)
	at
com.sun.corba.ee.internal.CosNaming.TransientNameService.<init>(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






  reply	other threads:[~2010-02-11 22:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 13:19 [gentoo-user] Keyword for dev-java/sun-j2ee dhk
2010-02-11 14:40 ` Alan McKinnon
2010-02-11 14:56   ` dhk
2010-02-11 15:25     ` Alan McKinnon
2010-02-11 15:46     ` Dale
2010-02-11 16:09       ` Alex Schuster
2010-02-11 18:28         ` Alan McKinnon
2010-02-11 19:49           ` Neil Bothwick
2010-02-11 23:51           ` Dale
2010-02-12  6:25             ` Alan McKinnon
2010-02-12 11:13               ` Dale
2010-02-11 16:36       ` dhk
2010-02-11 20:06         ` dhk
2010-02-11 20:31           ` Alan McKinnon
2010-02-11 22:10             ` dhk
2010-02-11 22:20               ` Alan McKinnon
2010-02-11 22:58                 ` dhk [this message]
2010-02-11 23:12                   ` Alan McKinnon
2010-02-11 23:28                     ` dhk
2010-02-14 20:37                       ` dhk
2010-02-15  7:16                         ` Alan McKinnon
2010-02-11 21:06           ` [gentoo-user] " walt
2010-02-11 22:11             ` dhk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B748BAC.5010600@optonline.net \
    --to=dhkuhl@optonline.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox