Your problem description reminds me of something I read
recently (an article where a columnist rants about his
Java experiences):
If
class A extends B { ... }
B x = new A();
then
((A) x) == null
if A and B were loaded by different classloaders.
David Dawkins
-----Original Message-----
From: Sean [mailto:[EMAIL PROTECTED]]
Sent: 03 September 2002 22:31
To: [EMAIL PROTECTED]
Subject: j2ee/j2se class loader problem??
My environment is Win 2k, JDK 1.4, J2EE 1.4.1 on Tomcat 4.0.2.
Within my SOAP service running on Tomcat I need to access an entity
EJB and also post messages to a JMS topic. In order to see the
javax/jms/... objects Tomcat needs to have j2ee.jar on its classpath.
If I publish to the topic before attempting to lookup and access the
bean I get a class cast exception on an ORBSingleton class. A class
with this name is defined both within EE and SE. If try to access the
EJB before publishing to the topic I get a class cast exception on another
corba class , also defined both in EE and SE.
If I run the code outside Tomcat with the same classpath everything works.
This looks like a class loader mess, but given that the Tomcat code needs
access to the j2ee.jar I can't think of a way around it.
Any ideas appreciated.
------------------------------------
OpenJaw Technologies Ltd.
Guinness Enterprise Centre
Taylor's Lane
Dublin 8
Ireland
http://www.openjawtech.com
Phone: +353 1 4100681
Fax: + 353 1 4100985
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>