tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawkins, David" <david.dawk...@brooks-pri.com>
Subject RE: j2ee/j2se class loader problem??
Date Tue, 03 Sep 2002 14:43:25 GMT
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:sean.macroibeaird@openjawtech.com]
Sent: 03 September 2002 22:31
To: tomcat-dev@jakarta.apache.org
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:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message