Bugs item #696381, was opened at 2003-03-03 06:59 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=696381&group_id=22866
Category: JBossWeb Group: v3.2 >Status: Open Resolution: Fixed Priority: 5 Submitted By: Scott M Stark (starksm) Assigned to: Jules Gosnell (jules_gosnell) Summary: JGStore not setup to use correct class loader Initial Comment: When a value is placed into the http session that corresponds to a class only available in the war, the following CNFE exception occurs: 20:35:14,653 ERROR [JGStore] could not demarshal incoming update java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.chap9.ex1.SessionValue at org.jboss.mx.loading.LoadMgr.beginLoadTask(LoadMgr.java:155) at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:161) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:217) at org.mortbay.j2ee.session.MarshallingInterceptor$ObjectInputStream.resolveClass(MarshallingInterceptor.java:70) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.javagroups.blocks.MethodCall.readExternal(MethodCall.java:432) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.mortbay.j2ee.session.MarshallingInterceptor.demarshal(MarshallingInterceptor.java:108) at org.mortbay.j2ee.session.JGStore$1.objectFromByteBuffer(JGStore.java:166) at org.javagroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:249) at org.javagroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:531) at org.javagroups.blocks.RequestCorrelator.access$100(RequestCorrelator.java:37) at org.javagroups.blocks.RequestCorrelator$Request.run(RequestCorrelator.java:747) at org.javagroups.util.ReusableThread.run(ReusableThread.java:208) at java.lang.Thread.run(Thread.java:536) This is due to the wrong class loader being used by the store. The web application context class loader needs to be used. I have put a fix into the 3.2 branch for this, but this only works if the store is an instance of AbstractReplicatedStore since the Store interface does not support setLoader. Look at the following code block in the Jetty class to see how this should be generatlized to all Stores. Line 334 of org.jboss.jetty.Jetty.java: // The web context class loader is needed for loading the war state objects Manager mgr = app.getDistributableSessionManager(); Store store = mgr.getStore(); if( store instanceof AbstractReplicatedStore ) { AbstractReplicatedStore ars = (AbstractReplicatedStore) store; ars.setLoader(app.getClassLoader()); } ---------------------------------------------------------------------- >Comment By: Jules Gosnell (jules_gosnell) Date: 2003-03-05 10:10 Message: Logged In: YES user_id=49106 I've taken your patch as the basis for a fix that I put into 3.0 and 3.2 last night. I shall be doing some refactoring on the Store classes as soon as I have the time. I shall probably move the ClassLoader attribute up the class hierarchy then, so that is available to other stores. I'll leave closing the bug to you, if you are happy with the solution. Cheers, Jules ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=696381&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development