1 2 Previous Next 26 Replies Latest reply on Dec 5, 2008 10:46 AM by David Lloyd

    ClassNotFound on deployment of a SchemaResolverDeployer

    David Lloyd Master

      Deploying my threads deployer on JBossAS (build from clean trunk as of about 30 minutes ago) yields:

      11:46:50,843 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying: vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:136)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.deploy(AbstractRealDeployerWithInput.java:125)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.internalDeploy(AbstractRealDeployerWithInput.java:102)
       at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.internalDeploy(AbstractComponentDeployer.java:78)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: Exception loading class for ScopeKey addition.
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:67)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
       ... 28 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer from BaseClassLoader@830911c{VFSClassLoaderPolicy@2c86c977{name=vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer domain=ClassLoaderDomain@5a57e787{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.system.NoAnnotationURLClassLoader@21abab88} roots=[MemoryContextHandler@1158986359[path= context=vfsmemory://3j001-no32d3-foa9setw-1-foa9twdo-9n real=vfsmemory://3j001-no32d3-foa9setw-1-foa9twdo-9n], DelegatingHandler@1407057423[path=jboss-threads.deployer context=file:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer]] delegates=[FilteredDelegateLoader@1352b5cd{delegate=VFSClassLoaderPolicy@22753e7a{vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.jar}}] exported=[]}}
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:385)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:63)
       ... 29 more
      


      The important error there is "java.lang.ClassNotFoundException: org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer". Happens with both minimal and default configs. Am I maybe making some mistake? Some classloader dependency I have to add?

        • 1. Re: ClassNotFound on deployment of a SchemaResolverDeployer
          David Lloyd Master

          Wait, I see where this is coming from. I'm still declaring my deployer like this:

          deployment xmlns="urn:jboss:bean-deployer:2.0">
           <bean name="JBossThreadsMetaDataFactoryDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer">
           <constructor>
           <parameter>org.jboss.threads.metadata.ThreadsMetaData</parameter>
           </constructor>
           </bean>
          
           <bean name="JBossThreadsMetaDataSchemaResolverDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
           <constructor>
           <parameter>org.jboss.threads.metadata.ThreadsMetaData</parameter>
           </constructor>
           <property name="name">jboss-threads.xml</property>
           <property name="registerWithJBossXB">true</property>
           </bean>
          </deployment>
          


          Which is clearly not safe against refactors. I suppose I should use the "deployers" stuff.

          Though I just noticed that the jboss-deployers-2_0.xsd schema has a targetNamespace of "urn:jboss:classloader:1.0". Oops? :-)

          • 2. Re: ClassNotFound on deployment of a SchemaResolverDeployer
            David Lloyd Master

            Also it uses 'required="true"' etc when it should be using 'use="required"'. I seem to recall reporting this before. :-)

            Can I commit a fix for this without screwing anything up?

            • 3. Re: ClassNotFound on deployment of a SchemaResolverDeployer
              David Lloyd Master

              Now I see that jboss-deployers doesn't have a tag for BeanMetaDataFactory deployers. So I guess I'm back to my original problem of finding where that class went :)

              • 4. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                Ales Justin Master

                 

                "david.lloyd@jboss.com" wrote:
                Also it uses 'required="true"' etc when it should be using 'use="required"'. I seem to recall reporting this before. :-)

                Can I commit a fix for this without screwing anything up?

                Sure, go ahead.
                I'll port it to branch then.

                • 6. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                  Ales Justin Master

                  btw: deployers go into deployers/
                  - file:/home/david/src/java/jbossas/trunk/build/output/jbos
                  s-5.0.0.GA/server/default/deploy/jboss-threads.deployer

                  Although they should work in deploy/ as well. :-)

                  • 8. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                    David Lloyd Master

                    Schema fixed in trunk. Will work some more on this tonight...

                    • 9. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                      David Lloyd Master

                      OK, latest update. Figuring that it was due to the fact that the classloading configuration for my deployer did not include the appropriate deployer classes, I changed my jboss-classloading.xml as follows:

                      <?xml version="1.0" encoding="UTF-8"?>
                      
                      <classloading name="jboss-threads-deployer-classloader" version="@VERSION@" xmlns="urn:jboss:classloading:1.0">
                       <requirements>
                       <module name="jboss-threads"/>
                       <package name="org.jboss.deployers.vfs.deployer.kernel"/>
                       <package name="org.jboss.deployers.vfs.spi.deployer"/>
                       </requirements>
                      </classloading>
                      


                      Now I get an NPE:

                      14:57:40,307 ERROR [AbstractKernelController] Error resolving dependencies for ClassLoader: name=vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer state=Describe mode=Manual requiredState=ClassLoader
                      java.lang.NullPointerException
                       at org.jboss.classloading.spi.dependency.ClassLoadingSpace.resolve(ClassLoadingSpace.java:325)
                       at org.jboss.classloading.spi.dependency.ClassLoadingSpace.joinAndResolve(ClassLoadingSpace.java:122)
                       at org.jboss.classloading.spi.dependency.ClassLoadingSpace.joinAndResolve(ClassLoadingSpace.java:169)
                       at org.jboss.classloading.spi.dependency.ClassLoadingSpace.resolve(ClassLoadingSpace.java:325)
                       at org.jboss.classloading.spi.dependency.Module.resolveModule(Module.java:737)
                       at org.jboss.classloading.spi.dependency.RequirementDependencyItem.resolve(RequirementDependencyItem.java:87)
                       at org.jboss.dependency.plugins.AbstractDependencyInfo.resolveDependencies(AbstractDependencyInfo.java:143)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1103)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1039)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
                       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
                       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
                       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                       at java.lang.Thread.run(Thread.java:619)
                      14:57:40,315 WARN [HDScanner] Failed to process changes
                      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                      
                      *** CONTEXTS IN ERROR: Name -> Error
                      
                      vfszip:/home/david/src/java/jbossas/trunk/build/output/jboss-5.0.0.GA/server/default/deploy/jboss-threads.deployer -> java.lang.NullPointerException
                      
                      
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
                       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:665)
                       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
                       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
                       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
                       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                       at java.lang.Thread.run(Thread.java:619)
                      


                      NPE = bad news...

                      • 10. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                        David Lloyd Master

                        BTW, the @VERSION@ thing gets replaced with my real version number during build (yes, I checked it).

                        • 11. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                          David Lloyd Master

                          If it matters, the jboss-classloading.xml of the jboss-threads.jar looks like this:

                          <?xml version="1.0" encoding="UTF-8"?>
                          
                          <classloading name="jboss-threads-classloader" version="1.0.0.Alpha" xmlns="urn:jboss:classloading:1.0">
                           <capabilities>
                           <module name="jboss-threads" version="1.0.0.Alpha"/>
                           <package name="org.jboss.threads" version="1.0.0.Alpha"/>
                           </capabilities>
                           <requirements/>
                          </classloading>
                          


                          • 12. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                            Ales Justin Master

                            I'll check the NPE.
                            Trying to mock your case.

                            • 13. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                              Ales Justin Master

                              Quick check/hack,
                              what if you put import-all="false" to classloading element?

                              • 14. Re: ClassNotFound on deployment of a SchemaResolverDeployer
                                Ales Justin Master

                                 

                                "alesj" wrote:
                                Quick check/hack,
                                what if you put import-all="false" to classloading element?

                                Although this should be there by default ...

                                1 2 Previous Next