3 Replies Latest reply on Jun 21, 2014 5:03 PM by Vio S

    RESTEasy application deployment error - java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/AnnotatedType

    Vio S Newbie

      Hello,

       

      I’m using JBOSS 5.1.0  GA and developed a web application with RESTEasy.

      I’m able to deploy the war file under the ‘web’ configuration (and everything works fine) but when I try to deploy it under any other server configurations (default, all) I’m getting the bellow error in the server.log.

      It looks to me that the ‘web’ configuration has some extra components but I was not able to identify them so far.

      If anyone has any hint it will be appreciated.

       

      Thank you.

       

       

      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to PreReal: name=vfszip:/opt/jboss-5.1.0.GA/server/default/deploy/myApp.war/ state=PostClassLoader mode=Manual requiredState=PreReal

      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/opt/jboss-5.1.0.GA/server/default/deploy/myApp.war/

                      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

                      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)

                      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:1631)

                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                      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:702)

                      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

                      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)

                      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                      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.NoClassDefFoundError: javax/enterprise/inject/spi/AnnotatedType

                      at java.lang.ClassLoader.defineClass1(Native Method)

                      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

                      at java.lang.ClassLoader.defineClass(ClassLoader.java:616)

                      at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)

                      at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:572)

                      at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:530)

                      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:507)

                      at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)

                      at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)

                      at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)

                      at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:251)

                      at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:150)

                      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:265)

                      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

                      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

                      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

                      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

                      at org.jboss.classloading.plugins.visitor.AbstractResourceContext.loadClass(AbstractResourceContext.java:118)

                      at org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer$WBDiscoveryVisitor.visit(WebBeanDiscoveryDeployer.java:134)

                      at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:264)

                      at org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor.visit(WrappingVirtualFileHandlerVisitor.java:62)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:361)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:376)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:376)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:376)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:306)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:374)

                      at org.jboss.virtual.plugins.context.AbstractVFSContext.visit(AbstractVFSContext.java:306)

                      at org.jboss.virtual.VFS.visit(VFS.java:421)

                      at org.jboss.virtual.VirtualFile.visit(VirtualFile.java:437)

                      at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:101)

                      at org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule.visit(VFSDeploymentClassLoaderPolicyModule.java:160)

                      at org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer.deploy(WebBeanDiscoveryDeployer.java:109)

                      at org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer.deploy(WebBeanDiscoveryDeployer.java:45)

                      at org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer.deploy(AbstractOptionalVFSRealDeployer.java:57)

                      at org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer.internalDeploy(AbstractOptionalRealDeployer.java:74)

                      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

                      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

                      ... 24 more

      Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.AnnotatedType

                      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                      at java.security.AccessController.doPrivileged(Native Method)

                      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)