- 
        1. Re: Even More Challenging Class Loading problembono Oct 13, 2002 12:27 AM (in response to bono)P.S. Actually herer are the two errors I get: 
 ----------------------------------------------------
 java.lang.LinkageError: loader constraints violated when linking admintool/ejb/stateless/AccessManager class
 at rtb.server.RealTimeBidder.authenticateAdministrator(RealTimeBidder.java:83)
 Here is the code:
 package rtb.server;
 //...
 import admintool.ejb.stateless.*; // Package containing AccessManagerHome
 //...
 // Line 83
 AccessManager am = ((AccessManagerHome) EJBHelper.getHome("AccessManagerHome", AccessManagerHome.class)).create();
 //...
 ----------------------------------------------------
 java.lang.ClassCastException
 at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:291)
 at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:132)
 at auctionengine.auctionlayer.EJBHelper.getAuctionFromEJB(EJBHelper.java:192)
 And the code:
 package auctionengine.auctionlayer;
 //...
 import admintool.ejb.stateless.OnlineAuctionsManagerHome;
 //...
 // Line 191
 Object ref = jndiContext.lookup("OnlineAuctionsManagerHome");
 // Line 192
 OnlineAuctionsManagerHome home = (OnlineAuctionsManagerHome) PortableRemoteObject.narrow(ref, admintool.ejb.stateless.OnlineAuctionsManagerHome.class);
 //...
- 
        2. Re: Even More Challenging Class Loading problemadrian.brock Oct 13, 2002 9:43 AM (in response to bono)Are you using java 1.4? 
 Does it work if you remove the narrow operation
 and do a straight cast?
 Object ref = jndiContext.lookup("OnlineAuctionsManagerHome");
 OnlineAuctionsManagerHome home = (OnlineAuctionsManagerHome) ref;
 Regards,
 Adrian
- 
        3. Re: Even More Challenging Class Loading problembono Oct 14, 2002 2:21 AM (in response to bono)I am using Java 1.3.1_05, but I tried 1.4.1 - same result. 
 When i remove the narrow operation I get a classcast exception:
 java.lang.ClassCastException: $Proxy175
 at auctionengine.auctionlayer.EJBHelper.getAuctionFromEJB(EJBHelper.java:192)
 ----------------------------------
 I did some debugging & found out that Java uses correctly the UniformClassLoader (or whatever jboss's classloader is called) when it does its internal classloading.
 However the problem is that the classes are not "unloaded" on redeploy of the EAR. I tried clearing all references I have & making an explicit System.gc() call in my destroyService() method, hoping that this would unlink the EJB classes - no luck, it did not help.
 nik
- 
        4. Re: Even More Challenging Class Loading problemadrian.brock Oct 14, 2002 6:58 AM (in response to bono)If that is true, it is a bug. 
 I had heard of problems with narrow on 1.4 because
 of the JVM caching classes in the RMI layer, but
 I'm pretty sure this was fixed.
 Can you create a simple test that reproduces the
 problem and post it as a bug at
 www.sf.net/projects/jboss
 Regards,
 Adrian
- 
        5. Re: Even More Challenging Class Loading problemaradka Dec 5, 2002 9:05 AM (in response to bono)Was this ever fixed. I couldn't find anything matching it in the big list? 
 I am having a similar (yet slightly different) problem. I didn't want to post all the details in a new thread, if this has been fixed in a later release (I am using jboss-3.0.3_tomcat-4.1.12).
 Thx,
 Alex
 
     
    