Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 54798 invoked from network); 3 Sep 2002 14:44:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Sep 2002 14:44:30 -0000 Received: (qmail 17261 invoked by uid 97); 3 Sep 2002 14:44:57 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 17186 invoked by uid 97); 3 Sep 2002 14:44:56 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 17171 invoked by uid 98); 3 Sep 2002 14:44:56 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <79E593B1974ED411865500508BD8BFC6C8FE9B@mail-europe1.brooks.com> From: "Dawkins, David" To: 'Tomcat Developers List' Subject: RE: j2ee/j2se class loader problem?? Date: Tue, 3 Sep 2002 10:43:25 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: