3 Replies Latest reply on Oct 3, 2008 5:47 PM by Peter Johnson

    no ClassLoader found for myclass

    Sascha Janz Master

      while running a TestNG i got the error.

      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.my.class
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClassInternal(Unknown Source)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at java.io.ObjectInputStream.resolveClass(Unknown Source)
       at org.jboss.invocation.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.java:109)
       at java.io.ObjectInputStream.readNonProxyDesc(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.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)
       at org.jboss.ejb.Container.invoke(Container.java:924)
       at sun.reflect.GeneratedMethodAccessor1398.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
       at sun.reflect.GeneratedMethodAccessor1397.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at javax.management.MBeanServerInvocationHandler.invoke(Unknown Source)
       at $Proxy16.invoke(Unknown Source)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      a:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:231)
       at sun.reflect.GeneratedMethodAccessor1397.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at javax.management.MBeanServerInvocationHandler.invoke(Unknown Source)
       at $Proxy16.invoke(Unknown Source)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerTh


      what is the problem?



        • 1. Re: no ClassLoader found for myclass
          Peter Johnson Master

          According to the error message, it is expecting a class named "class" in a package named com.my. Frankly, I am amazed that you were able to declare a class named "class".

          I think we need to see some code, but based on the scant information that you have provided, I don't know exactly what source code to ask for, other than all of it - the test code and the code you are testing.

          Also, please tell us more about your environment. OS version, JVM version, JBossAS version, how you are running JBossAS (via run script, as service, via Eclipse), what it is you are attempting to test (EJB, web service, messaging), and how you are running TestNG (via Ant, within Eclipse).

          • 2. Re: no ClassLoader found for myclass
            Sascha Janz Master

            ok too little information. of course class was just a place holder. the name is WorkflowData

            i use jboss 4.2.2 GA on windows 2003 server with seam 2.0.2 and jbpm enterprise. i develop under eclipse ganymede with jboss tools. JDK is 1.6.04

            i try to test ejb functionality. i run the test with testng plugin for eclipse.

            • 3. Re: no ClassLoader found for myclass
              Peter Johnson Master

              Is "WorkflowData" the full class name? No package name? Is it your class? (Without the package name I cannot tell who 'owns' it.)

              If it is your class, then this is prabably an Eclipse or JBoss Tools issue in which case the Jboss Tools forum might be better for getting answers (about the only answer you will get here is "try it outside Eclipse").