[Remoting] - JBoss & Java 1.6 class loading issue?
by mouserSVK
Hello, I am using JBoss AS 4.0.4 / JBoss AS 4.0.5 and this problem occures on both while using JRE/JDK 1.6 on the client side.
I've got simple EJB3 and invoking its method like this:
// get the initial context
| Context ctx = new InitialContext();
| // find context of our interface
| Locator test = (Locator) ctx.lookup("LocatorBean/remote");
|
| // perform 'invoke()' method on bean itself
| GetCitiesRequest req = new GetCitiesRequest("Slovakia", "Bratislava");
| System.out.println(test.invoke(req));
Object that has 'String' class inside is returned. Logic of bean is performed successfully, but while the result is being returned back to client, following exception is thrown (there is only cause, real:
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy0.invoke(Unknown Source)
| ..
| Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
| at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
| at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| ... 2 more
|
Everything is fine when using Java 1.5 on client side. I've tried running the server both on Java 1.5 and 1.6. Results were the same.
Maybe there is problem in loading of class because of Java 1.6 runtime regression, as it is described here ?:
http://forums.java.net/jive/thread.jspa?threadID=15823
https://glassfish.dev.java.net/issues/show_bug.cgi?id=714
Similar problem is described here (I think it is the same one):
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988513[/url]
Anyone else experiencing this? Or can someone tell if this is bug in JBoss?
Thanks,
Mouser.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993457#3993457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993457
19 years, 4 months
[Beginners Corner] - Re: JBoss failed JNDI lookup without any error
by horunkoya
Ok. I've managed to extract the error message and it is as follows:
$Proxy82
java.lang.ClassCastException: $Proxy82
at com.janes.jf.action.LoginAction.process(LoginAction.java:50)
at com.janes.jf.action.RequestAction.execute(RequestAction.java:21)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.janes.jf.filter.LoginFilter.doFilter(LoginFilter.java:24)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
The below is the code I am using to do the lookup
| InitialContext ic = new InitialContext();
| MAPDelegateHome mapHome = (MAPDelegateHome)ic.lookup("java:comp/env/ejb/MAPDelegate");
|
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993456#3993456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993456
19 years, 4 months