1 Reply Latest reply on Sep 18, 2011 2:38 AM by Sam W

    Simple Jar deploybement failed with AS7

    Sam W Expert

      Hi,

       

      I created a sample Spring3+EJB3 jar file and during the deployment, Jboss AS throws the following exception:

       

       

      14:46:35,392 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "spring-ejb.jar"

      14:46:35,397 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to spring-ejb.jar

      14:46:35,401 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."spring-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."spring-ejb.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "spring-ejb.jar"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_03-p4]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_03-p4]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]

      Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

              at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) [:1.6.0_03-p4]

              at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) [:1.6.0_03-p4]

              at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) [:1.6.0_03-p4]

              at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) [:1.6.0_03-p4]

              at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) [:1.6.0_03-p4]

              at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) [:1.6.0_03-p4]

              at java.lang.Class.initAnnotationsIfNecessary(Class.java:3072) [:1.6.0_03-p4]

              at java.lang.Class.getAnnotation(Class.java:3029) [:1.6.0_03-p4]

              at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getRemoteBusinessInterfaces(BusinessViewAnnotationProcessor.java:126)

              at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.processViewAnnotations(BusinessViewAnnotationProcessor.java:99)

              at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:84)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]

              ... 5 more

       

       

      14:46:35,404 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "spring-ejb.jar" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"spring-ejb.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"spring-ejb.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"spring-ejb.jar\""}}

      14:46:35,407 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Stopped deployment spring-ejb.jar in 2ms

      14:46:35,408 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"spring-ejb.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"spring-ejb.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"spring-ejb.jar\""}}}}

       

       

       

      I have searched in google, I couldn't found any answer.

       

      Any suggestion would be very appreciated.

      Thanks

      Sam

        • 1. Re: Simple Jar deploybement failed with AS7
          Sam W Expert

          Hi,

           

          After changed the deployment script to:

           

           

          <ejb-local-ref>

                          <ejb-ref-name>ejb/CategoryManager</ejb-ref-name>

                          <ejb-ref-type>Session</ejb-ref-type>

                          <local>ix.houseware.category.CategoryManager</local>

                          <ejb-link>CategoryManagerImpl</ejb-link>

                  </ejb-local-ref>

           

           

          had another deployemt, jboss as7 throws a differnet error:

           

           

          16:33:21,070 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "CategoryClient-ear.ear"

          16:33:21,228 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "CategoryClient-web.war"

          16:33:21,228 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "CategoryClient-ejb-1.0-SNAPSHOT.jar"

          16:33:21,550 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api dependency to CategoryClient-ear.ear

          16:33:21,552 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) added javax.persistence.api dependency to CategoryClient-ejb-1.0-SNAPSHOT.jar

          16:33:21,552 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api dependency to CategoryClient-web.war

          16:33:21,594 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CategoryManagerImpl in deployment unit subdeployment "C

          ategoryClient-ejb-1.0-SNAPSHOT.jar" of deployment "CategoryClient-ear.ear" are as follows:

           

           

                  java:global/CategoryClient-ear/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl!ix.houseware.category.CategoryManager

                  java:app/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl!ix.houseware.category.CategoryManager

                  java:module/CategoryManagerImpl!ix.houseware.category.CategoryManager

                  java:global/CategoryClient-ear/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl

                  java:app/CategoryClient-ejb-1.0-SNAPSHOT/CategoryManagerImpl

                  java:module/CategoryManagerImpl

           

           

          16:33:21,840 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/CategoryClient-web]] (MSC service thread 1-5) Initializing Spring root WebApplicationContext

          16:33:22,139 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/CategoryClient-web]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'categoryFinderController' defined in "/content/CategoryClient-ear.ear/CategoryClient-web.war/WEB-INF/classes/ix/houseware/category/controller/CategoryFinderController.class": Unsatisfied dependency expressed through constructor argument with index 0 of type [ix.houseware.category.CategoryManager]: : No matching bean of type [ix.houseware.category.CategoryManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [ix.houseware.category.CategoryManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

                  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [spring-context-3.0.6.RELEASE.jar:]

                  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [spring-context-3.0.6.RELEASE.jar:]

                  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web-3.0.6.RELEASE.jar:]

                  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web-3.0.6.RELEASE.jar:]

                  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.6.RELEASE.jar:]

                  at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]

                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT]

                  at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_03-p4]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_03-p4]

                  at java.lang.Thread.run(Thread.java:619) [:1.6.0_03-p4]

          Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [ix.houseware.category.CategoryManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:924) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:793) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795) [spring-beans-3.0.6.RELEASE.jar:]

                  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) [spring-beans-3.0.6.RELEASE.jar:]

                  ... 23 more

           

           

          16:33:22,142 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart

          16:33:22,142 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/CategoryClient-web] startup failed due to previous errors

          16:33:22,153 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/CategoryClient-web]] (MSC service thread 1-5) Closing Spring root WebApplicationContext

          16:33:22,155 INFO  [org.jboss.web] (MSC service thread 1-5) registering web context: /CategoryClient-web

          16:33:22,163 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployed "CategoryClient-ear.ear"