2 Replies Latest reply on Mar 15, 2006 6:16 AM by ihunter

    ClassLoading Isolation cf Java1.4 v Java5

    ihunter

      Hi Folks,

      We've got a problem where an EJB makes a call out to a custom MBean using a Java class (generated from xdoclet) as a parameter. The (parameter) class in question is located both EJB Jar file, and the SAR file.

      At run time, this throws a ClassNotFoundException, and immediately reached for the ClassLoader isolation docs. So far, we have tried various isolation tags, but nothing has worked.

      However, the problem disappears when the server runs under Java5. Unfortunately we're tied to use Java1.4 for the moment.

      Can anybody shed light on what might be going on here.

      Many Thanks
      Ian Hunter

      [BTW Sorry if this not quite the right forum]

        • 1. Re: ClassLoading Isolation cf Java1.4 v Java5
          starksm64

          Not without some debug level logging showing the nature of the error.

          • 2. Re: ClassLoading Isolation cf Java1.4 v Java5
            ihunter

            Hi Scott,

            Thanks for your interest here.

            The actual exception is below.

            The scenario is that an EJB called BscController is invoking an MBean with a method that takes a parameter of type MOAttribute. The class of this parameter object is present in the EJB container and in the SAR file.

            As mentioned earlier, this seems fine for Java5, but throws this exception in Java1.4.

            Many thanks for any help
            Ian Hunter
            ==============================

            11:05:00,295 ERROR [LogInterceptor] RuntimeException in method: public abstract com.ipaccess.common.BssOpResult[] com.ipaccess.omcr.server.session.interfaces.BscController.setAttributesOnManagedObject
            s(java.lang.String,com.ipaccess.omcr.server.entity.ManagedObjectVO[]) throws java.lang.Exception,java.rmi.RemoteException:
            java.lang.reflect.UndeclaredThrowableException
            at $Proxy184.setAttributesOnManagedObject(Unknown Source)
            at com.ipaccess.omcr.server.session.BscControllerBean.setAttributesOnManagedObjects(BscControllerBean.java:115)
            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 org.jboss.invocation.Invocation.performCall(Invocation.java:345)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
            at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
            at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
            at org.jboss.ejb.Container.invoke(Container.java:873)
            at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
            at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:534)
            Caused by: ReflectionException: null Cause: java.lang.ClassNotFoundException: [Lcom.ipaccess.omcr.server.entity.MOAttributeVO;
            at org.jboss.mx.server.ExceptionHandler.handleException(ExceptionHandler.java:48)
            at javax.management.StandardMBean.invoke(StandardMBean.java:260)
            at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at javax.management.MBeanServerInvocationHandler$InvokeAction.perform(MBeanServerInvocationHandler.java:322)
            at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:140)
            ... 40 more
            Caused by: java.lang.ClassNotFoundException: [Lcom.ipaccess.omcr.server.entity.MOAttributeVO;
            at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at javax.management.StandardMBean.loadClass(StandardMBean.java:277)
            at javax.management.StandardMBean.invoke(StandardMBean.java:253)
            ... 44 more