0 Replies Latest reply on Dec 14, 2004 3:30 PM by james richards

    DeploymentException: no classloader found caused by class no

    james richards Newbie

      Hi all,

      I'm in the process of upgrading to jboss 3.2.6 from 3.2.1. I have run into a class loader problem and have come to my wit's end. Currently, I have added some thirdpatry jars into my MANIFEST file under my EAR directory. However adding these jars have caused an exception, which I have pasted below. As a side note, I have tried putting these jars in the deploy directory only to find other class not found exceptions. If my manifest isn't the best place for them. Please let me know. Otherwise, any help on the given problem would be very much appriciated.

      Exception:

      2004-12-13 15:59:11,228 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml
      2004-12-13 15:59:11,228 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml
      2004-12-13 15:59:11,229 DEBUG [org.jboss.system.ServiceCreator] About to create bean: MyComp:service=StartupSvc with code: com.mycomp.sys.startup.StartupSvc
      2004-12-13 15:59:11,280 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2004-12-13 15:59:11,285 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      2004-12-13 15:59:11,286 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2004-12-13 15:59:11,287 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: com.mycomp.sys.startup.StartupSvc; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mycomp.sys.startup.StartupSvc)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
      at org.jboss.system.ServiceController.install(ServiceController.java:198)
      at sun.reflect.GeneratedMethodAccessor19.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:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      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)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:775)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at sun.reflect.GeneratedMethodAccessor14.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:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.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.startService(AbstractDeploymentScanner.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor2.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:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:414)
      at sun.reflect.GeneratedMethodAccessor6.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:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:829)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:588)
      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.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
      at org.jboss.Main.boot(Main.java:145)
      at org.jboss.Main$1.run(Main.java:399)
      at java.lang.Thread.run(Thread.javaCaused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mycomp.sys.startup.StartupSvc
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:185)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:186)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:136)
      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:123)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
      ... 79 more
      2004-12-13 15:59:11,296 DEBUG [org.jboss.deployment.SARDeployer] Unregistering service UCL=jmx.loading:UCL=8fa0d1
      2004-12-13 15:59:11,298 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(false) org.jboss.mx.loading.UnifiedClassLoader3@8fa0d1{ url=file:/home/jrichard/p4/dev/platform/deploy/approot ,addedOrder=33}
      2004-12-13 15:59:11,299 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceDeployer,type=org.jboss.deployment.SubDeployer.destroy,sequenceNumber=85,timeStamp=1102982351298,message=null,userData=org.jboss.deployment.DeploymentInfo@f6d8565e { url=file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml }
      deployer: org.jboss.deployment.SARDeployer@16fe0f4
      status: null
      state: CREATE_DEPLOYER
      watch: file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml
      lastDeployed: 1102982337722
      lastModified: 1102982337000
      mbeans:
      ]
      2004-12-13 15:59:11,300 DEBUG [org.jboss.management.j2ee.ServiceModule] destroy(), remove Service Module: mbeans-service.xml
      2004-12-13 15:59:11,301 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] removeObject(), name: mbeans-service.xml, encrypted name: mbeans-service.xml, search criteria: jboss.management.local:j2eeType=ServiceModule,*,name=mbeans-service.xml
      2004-12-13 15:59:11,304 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Removed JSR-77 SAR: mbeans-service.xml
      2004-12-13 15:59:11,305 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
      2004-12-13 15:59:11,307 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml
      org.jboss.deployment.DeploymentException: create operation failed for package file:/home/jrichard/p4/dev/platform/deploy/approot/mbeans-service.xml; - nested throwable: (org.jboss.deployment.DeploymentException: No ClassLoaders found for: com.mycomp.sys.startup.StartupSvc; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mycomp.sys.startup.StartupSvc))
      :534)

      mbean-service.xml:
      <server>
       <!-- the startup service MBean -->
       <mbean code="com.mycomp.sys.startup.StartupSvc"
       name="MyComp:service=StartupSvc">
       <attribute name="ClassNames">com.mycomp.price.web.PriceWebStartup</attribute>
       </mbean>
      
       <mbean code="com.mycomp.admin.monitor.SnmpSvc"
       name="MyComp:service=SnmpSvc">
       </mbean>
      </server>
      
      Here is the manifest, the last four jars are the ones I added
      Manifest.mf:
      
      Manifest-Version: 1.0
      Class-Path: dtapps.ear/lib/ dtapps.ear/lib/struts.jar dtapps.ear/lib/db2java.zip dtapps.ear/lib/db2jcc.jar dtapps.ear/lib/db2jcc_license_cu.jar dtapps.ear/lib/runtime.zip dtapps.ear/lib/dom4j-full.jar dtapps.ear/lib/jakarta-poi-1.8.0-dev-20020919.jar dtapps.ear/lib/jcommon-0.6.4.jar dtapps.ear/lib/jfreechart-0.9.2.jar dtapps.ear/lib/pja.jar dtapps.ear/lib/multipart.jar dtapps.ear/lib/xbasej.jar dtapps.ear/lib/AdventNetAgentRuntimeUtilities.jar dtapps.ear/lib/AdventNetJmxAgent.jar dtapps.ear/lib/AdventNetLogging.jar dtapps.ear/lib/AdventNetSnmp.jar
      
      The class com.mycomp.sys.startup.StartupSvc is located in
      dtapps.ear/lib/com/mycomp/sys/startup/
      
      the URL Scanner is defined as:
      <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
       name="jboss.deployment:type=DeploymentScanner,flavor=URL">
       <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
       <attribute name="ScanPeriod">5000</attribute>
       <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
       <attribute name="Filter">org.jboss.deployment.scanner.DeploymentFilter</attribute>
       <attribute name="URLs">
       deploy/,file:/home/jrichard/p4/dev/platform/deploy/approot
       </attribute>
       <attribute name="RecursiveSearch">True</attribute>
      
       </mbean>