1 Reply Latest reply on Feb 7, 2006 9:38 AM by rme

    No ClassLoaders found for Service

    rme Newbie

      JBoss 3.2.5:
      So, I've tried to load a JBoss Service but dispite many different
      combinations of ear/sar/-server.xml/etc. I allways get the same
      error message:

      2006-02-04 14:17:36,654 INFO [EARDeployer] - Init J2EE application:
      file:/usr/local/ED/app/jboss/server/cs/deploy/edgedynamics/servicetest.ear
      2006-02-04 14:17:38,725 WARN [NestedThrowable] - Duplicate throwable nesting
      of same base type: class org.jboss.deployment.DeploymentException is assignable
      from: class org.jboss.deployment.DeploymentException
      2006-02-04 14:17:38,728 ERROR [MainDeployer] - could not create deployment:
      file:/usr/local/ED/app/jboss/server/cs/tmp/deploy/tmp59967servicetest.ear-contents/servicetest-service.xml
      org.jboss.deployment.DeploymentException: create operation failed for package
      file:/usr/local/ED/app/jboss/server/cs/tmp/deploy/tmp59967servicetest.ear-contents/servicetest-service.xml;
      - nested throwable: (org.jboss.deployment.DeploymentException: No ClassLoaders
      found for: com.servicetest.ServerTest ; - nested
      throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for:
      com.servicetest.ServerTest ))
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:782)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at
      org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at
      org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at
      org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
      at
      org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at
      org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at
      org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      Caused by: org.jboss.deployment.DeploymentException: No ClassLoaders found for:
      com.servicetest.ServerTest ; - nested throwable:
      (java.lang.ClassNotFoundException: No ClassLoaders found for:
      com.servicetest.ServerTest )
      at
      org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
      at
      org.jboss.system.ServiceController.install(ServiceController.java:198)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at
      org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      ... 20 more
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:com.servicetest.ServerTest
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:275)
      at
      org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
      at
      org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at
      org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:843)
      at
      org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:290)
      at
      org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:317)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
      at
      org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
      at
      org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
      ... 33 more
      2006-02-04 14:17:38,774 ERROR [MainDeployer] - could not create deployment:
      file:/usr/local/ED/app/jboss/server/cs/deploy/edgedynamics/servicetest.ear
      org.jboss.deployment.DeploymentException: create operation failed for package
      file:/usr/local/ED/app/jboss/server/cs/tmp/deploy/tmp59967servicetest.ear-contents/servicetest-service.xml;
      - nested throwable: (org.jboss.deployment.DeploymentException: No ClassLoaders
      found for: com.servicetest.ServerTest ; - nested
      throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for:
      com.servicetest.ServerTest ))
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:782)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at
      org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source) at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
      ... 20 more
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
      com.servicetest.ServerTest
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:275)
      at
      org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
      at
      org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at
      org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:843) at
      org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:290)
      at
      org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:317)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
      at
      org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
      at
      org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)


      The Service java class is:

      package com.servicetest;


      public class ServerTest implements ServerTestMBean {
      public ServerTest() {
      System.out.println("ServerTest");
      }

      public void start() {
      System.out.println("ServerTest.start");
      }
      public void stop() {
      System.out.println("ServerTest.stop");
      }
      }

      and the mbean is:

      package com.servicetest;

      public interface ServerTestMBean {
      void start();
      void stop();
      }

      (I've tried using the ServiceMBeanSupport class but same error message.)

      My ear has:

      META-INF/jboss-app.xml

      <?xml version="1.0" encoding="UTF-8"?>
      &gt;jboss-app>
      &gt;loader-repository>com.servicetest:loader=edge-servicetest.ear</loader-repository>
      &gt;module>
      &gt;service>servicetest-service.xml
      &gt;/module>
      &gt;/jboss-app>

      Removing the loader-repository makes no difference.

      The META-INF/application.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      &gt;application id="STEST_App">
      &gt;display-name>Service Test Server</display-name>
      &gt;module id="STEST">
      &gt;java>servicetest-service.xml
      &gt;/module>
      <&gt;/application>


      I've tried removing the module element, same error message.
      Having a DOCTYPE element makes no difference.

      The servicetest-service.xml contains:

      <?xml version="1.0" encoding="UTF-8"?>
      &gt;server>
      &gt;mbean code="com.servicetest.ServerTest "
      name="com.servicetest:service=ServerTest"/>
      &gt;/server>

      Having a DOCTYPE element makes no difference.

      I've tried using a jboss-service.xml file rather than jboss-app.xml
      in a sar-file and got the same classloader not found error.

      We've got other ears with JBoss services but they also have ejbs.
      So I tried added a do-nothing ejb, but sill go the same error.

      Help.
      Thanks.
      Richard