0 Replies Latest reply on Feb 10, 2010 12:21 PM by Christophe Delory

    WarClassLoaderDeployer and WAR redeploy

    Christophe Delory Newbie

      Hello everybody

       

      I need my WAR to share the same class loader as my MBean present in the JBoss 5.1.0 distribution, and thus I removed the WarClassLoaderDeployer from the war-deployers-jboss-beans.xml, as explained in http://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5

      (if needed, I'll explain in a future post the reason of this "custom" setting, but it's not the point at this very moment.)

      The WAR is located in an EAR, which also own sessions beans.

      From time to time, I need to "hot" redeploy the EAR.

      Redeploy is performed though the appropriate method in MBean "jboss.system:service=MainDeployer".

      Then I encounter an error as soon as one of the redeployed classes is needed by my MBean, which is reproduced below.

      I can't figure out if it's a bug or a feature...

      Help would be much appreciated. Thanks!

       

      org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed
           at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:513)
           at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:230)
           at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
           at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
           at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
           at sun.reflect.GeneratedMethodAccessor330.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
           at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
           at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
           at sun.reflect.GeneratedMethodAccessor329.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
           at sun.rmi.transport.Transport$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at sun.rmi.transport.Transport.serviceCall(Unknown Source)
           at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
           at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
           at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalArgumentException: interface OneOfMySLSBInterface is not visible from class loader
           at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
           at org.jboss.invocation.MarshalledValueInputStream.resolveProxyClass(MarshalledValueInputStream.java:171)
           at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
           at java.io.ObjectInputStream.readClassDesc(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readArray(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readArray(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readObject(Unknown Source)
           at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:91)
           at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:509)
           ... 37 more