From: SourceForge.net <no...@so...> - 2003-05-23 08:57:37
|
Bugs item #733949, was opened at 2003-05-07 15:38 Message generated for change (Comment added) made by frechdachs You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=733949&group_id=22866 Category: JBossServer Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Andrea Klein (frechdachs) Assigned to: Nobody/Anonymous (nobody) Summary: ClassNotFoundException using HTTP invoker on bean returning Initial Comment: I have a stateless session bean that returns a java.util.Map (actually a HashMap) containing an array of custom objects. When calling this bean using the JRMI invoker everything is working fine. When calling it using the HTTP invoker servlet, I get a ClassNotFoundException on the client. As far as I could see, the class loader seems to think that it has to load the array class for my custom class from the file system. But why I do not have a clue. Furthermore this happens only if the client has not already loaded the element class of the array, for example catching the ClassNotFoundException and issuing the same call again returns without any errors. For me it looks like a bug in the serialization done in the HTTP invoker layer. Attached is the src jar and the ejb jar to deploy. The client is aklein.test.client.MapTestClient requiring the JNDI name of the bean to invoke: aklein/test/MapTest (for JRMI), aklein/test/MapTestHTTP ( for HTTP ). And here is the client side out put/stack trace when using HTTP: creating bean from: aklein/test/MapTestHTTP log4j:WARN No appenders could be found for logger (org.jboss.naming.HttpNamingContextFactory). log4j:WARN Please initialize the log4j system properly. calling getMap: java.lang.reflect.UndeclaredThrowableException at $Proxy2.getMap(Unknown Source) at aklein.test.client.MapTestClient.main(MapTestClient.java:41) Caused by: java.lang.ClassNotFoundException: [Laklein.test.maptest.Content; at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:262) at org.jboss.invocation.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:37) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1503) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1550) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1261) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) at java.util.HashMap.readObject(HashMap.java:986) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:809) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1733) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1636) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) at org.jboss.invocation.http.interfaces.HttpInvokerProxy.invoke(HttpInvokerProxy.java:106) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76) at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) ... 2 more calling getList: got list: [[Laklein.test.maptest.Content;@1a9334] Thanks for any help. Cheers, Andrea ---------------------------------------------------------------------- >Comment By: Andrea Klein (frechdachs) Date: 2003-05-23 08:57 Message: Logged In: YES user_id=773594 I found the cause: overwritten method resolveClass(ObjectStreamClass) in org.jboss.invocation.MarshalledValueInputStream. Removing this method to allow the implementation of the super class ObjectInputStream to take care of this, removes the exception. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=733949&group_id=22866 |