5 Replies Latest reply on Oct 11, 2011 4:58 AM by Sam W

    Can't deploy ear file in AS7.

    Sam W Expert

      Hi,

       

      There is another problem when I deploy my server side ear file. The ear file consists of cxf2 and persistent layer with hibernate.

       

      Here is the full deployment message:

       

       

      23:08:02,917 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "category5-ws-ear.ear"

      23:08:04,045 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "category5-ws-ejb.jar"

      23:08:04,045 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "category5-ws-web.war"

      23:08:04,063 INFO  [org.jboss.jpa] (MSC service thread 1-4) read persistence.xml for HousewareCategoryPU

      23:08:04,068 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to category5-ws-ear.ear

      23:08:04,069 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)

      23:08:04,069 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added org.hibernate dependency to application deployment

      23:08:04,073 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to category5-ws-ejb.jar

      23:08:04,073 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to category5-ws-web.war

      23:08:04,073 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)

      23:08:04,073 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) added org.hibernate dependency to application deployment

      23:08:04,112 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-5) JNDI bindings for session bean named CategorySubcategoriesServiceImpl in deployment unit subdeployment "category5-ws-web.war" of deployment "category5-ws-ear.ear" are as follows:

       

       

       

       

      23:08:04,116 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CalculatorBean in deployment unit subdeployment "category5-ws-ejb.jar" of deployment "category5-ws-ear.ear" are as follows:

       

       

              java:global/category5-ws-ear/category5-ws-ejb/CalculatorBean!ix.houseware.category.CalculatorLocal

              java:app/category5-ws-ejb/CalculatorBean!ix.houseware.category.CalculatorLocal

              java:module/CalculatorBean!ix.houseware.category.CalculatorLocal

              java:global/category5-ws-ear/category5-ws-ejb/CalculatorBean

              java:app/category5-ws-ejb/CalculatorBean

              java:module/CalculatorBean

       

       

      23:08:04,117 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CategoryImagesFacade in deployment unit subdeployment "category5-ws-ejb.jar" of deployment "category5-ws-ear.ear" are as follows:

       

       

              java:global/category5-ws-ear/category5-ws-ejb/CategoryImagesFacade!ix.houseware.category.entity.facade.CategoryImagesFacade

              java:app/category5-ws-ejb/CategoryImagesFacade!ix.houseware.category.entity.facade.CategoryImagesFacade

              java:module/CategoryImagesFacade!ix.houseware.category.entity.facade.CategoryImagesFacade

              java:global/category5-ws-ear/category5-ws-ejb/CategoryImagesFacade

              java:app/category5-ws-ejb/CategoryImagesFacade

              java:module/CategoryImagesFacade

       

       

      23:08:04,117 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CallerName in deployment unit subdeployment "category5-ws-ejb.jar" of deployment "category5-ws-ear.ear" are as follows:

       

       

              java:global/category5-ws-ear/category5-ws-ejb/CallerName!ix.caller.CallerLocal

              java:app/category5-ws-ejb/CallerName!ix.caller.CallerLocal

              java:module/CallerName!ix.caller.CallerLocal

              java:global/category5-ws-ear/category5-ws-ejb/CallerName

              java:app/category5-ws-ejb/CallerName

              java:module/CallerName

       

       

      23:08:04,117 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named CategorySubcategoriesFacade in deployment unit subdeployment "category5-ws-ejb.jar" of deployment "category5-ws-ear.ear" are as follows:

       

       

              java:global/category5-ws-ear/category5-ws-ejb/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

              java:app/category5-ws-ejb/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

              java:module/CategorySubcategoriesFacade!ix.houseware.category.entity.facade.CategorySubcategoriesFacadeLocal

              java:global/category5-ws-ear/category5-ws-ejb/CategorySubcategoriesFacade

              java:app/category5-ws-ejb/CategorySubcategoriesFacade

              java:module/CategorySubcategoriesFacade

       

       

      23:08:04,124 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence

      23:08:04,150 INFO  [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] (MSC service thread 1-1) Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.

      23:08:04,154 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-1) Add Service

      id=CategorySubcategoriesServiceImpl

      address=http://localhost:8080/category5-ws-web/services

      implementor=ix.houseware.category.service.CategorySubcategoriesServiceImpl

      invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker

      serviceName={http://service.category.houseware.ix/}CategorySubcategoriesServiceImplService

      portName={http://service.category.houseware.ix/}CategorySubcategoriesServiceImplPort

      wsdlLocation=null

      mtomEnabled=false

      23:08:04,155 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-1) register: jboss.ws:context=category5-ws-web,endpoint=CategorySubcategoriesServiceImpl

      23:08:04,306 INFO  [org.jboss.jpa] (MSC service thread 1-7) starting Persistence Unit Service 'category5-ws-ear.ear/category5-ws-ejb.jar#HousewareCategoryPU'

      23:08:04,402 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-7) Hibernate Commons Annotations 3.2.0.Final

      23:08:04,406 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH00412:Hibernate [WORKING]

      23:08:04,407 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH00206:hibernate.properties not found

      23:08:04,408 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH00021:Bytecode provider name : javassist

      23:08:04,421 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-7) HHH00204:Processing PersistenceUnitInfo [

              name: HousewareCategoryPU

              ...]

      23:08:04,426 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service {http://service.category.houseware.ix/}CategorySubcategoriesServiceImplService from class ix.houseware.category.service.CategorySubcategoriesService

      23:08:04,448 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-7) HHH00194:Package not found or wo package-info.java: ix.houseware.category.utils

      23:08:04,449 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-7) HHH00194:Package not found or wo package-info.java: ix.caller

      23:08:04,449 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-7) HHH00194:Package not found or wo package-info.java: ix.houseware.category.entity.facade

      23:08:04,449 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-7) HHH00194:Package not found or wo package-info.java: ix.houseware.category.entity

      23:08:04,449 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-7) HHH00194:Package not found or wo package-info.java: ix.houseware.category

      23:08:04,556 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-7) HHH00130:Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

      23:08:04,588 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-7) HHH00400:Using dialect: org.hibernate.dialect.MySQLDialect

      23:08:04,599 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-7) HHH00268:Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

      23:08:04,602 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-7) HHH00397:Using ASTQueryTranslatorFactory

      23:08:04,960 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH00228:Running hbm2ddl schema update

      23:08:04,960 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH00102:Fetching database metadata

      23:08:04,964 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH00396:Updating schema

      23:08:04,975 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00261:Table found: houseware.REVINFO

      23:08:04,975 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00037:Columns: [rev, revtstmp]

      23:08:04,975 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00108:Foreign keys: []

      23:08:04,975 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00126:Indexes: [primary]

      23:08:04,980 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00261:Table found: houseware.category_images

      23:08:04,980 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00037:Columns: [image_data, image_title, image_type, category_id, image_id]

      23:08:04,980 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00108:Foreign keys: [category_images_ibfk_1]

      23:08:04,980 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00126:Indexes: [primary]

      23:08:04,984 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00261:Table found: houseware.category_subcategories

      23:08:04,985 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00037:Columns: [category_name, lft, rgt, category_id, category_desc, parent_id]

      23:08:04,985 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00108:Foreign keys: []

      23:08:04,985 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-7) HHH00126:Indexes: [lft, primary, rgt]

      23:08:04,985 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH00232:Schema update complete

      23:08:05,109 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-1) Setting the server's publish address to be http://localhost:8080/category5-ws-web/services

      23:08:05,118 WARN  [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-1) Cannot resolve resource: cxf

      23:08:05,203 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-1) WSDL published to: file:/usr/local/users/jboss/jboss71A/standalone/data/wsdl/category5-ws-ear.ear/category5-ws-web.war/CategorySubcategoriesServiceImplService.wsdl

      23:08:05,235 INFO  [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-5) Starting service jboss.ws.endpoint.category5-ws-web.CategorySubcategoriesServiceImpl

      23:08:05,442 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "category5-ws-ear.ear" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./category5-ws-web missing [ jboss.deployment.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".component.CategorySubcategoriesServiceImpl.VIEW.\"ix.houseware.category.service.CategorySubcategoriesServiceImpl\" ]"]}

      23:08:05,446 INFO  [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-5) Stopping service jboss.ws.endpoint.category5-ws-web.CategorySubcategoriesServiceImpl

      23:08:05,453 INFO  [org.jboss.jpa] (MSC service thread 1-4) stopping Persistence Unit Service 'category5-ws-ear.ear/category5-ws-ejb.jar#HousewareCategoryPU'

      23:08:05,464 WARN  [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-6) Cannot resolve resource: org.apache.cxf.ws.rm.RMManager/bus

      23:08:05,472 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-6) remove: jboss.ws:context=category5-ws-web,endpoint=CategorySubcategoriesServiceImpl

      23:08:05,477 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) Stopped deployment category5-ws-ejb.jar in 35ms

      23:08:05,478 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment category5-ws-web.war in 36ms

      23:08:05,490 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment category5-ws-ear.ear in 48ms

      23:08:05,492 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./category5-ws-web missing [ jboss.deployment.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".component.CategorySubcategoriesServiceImpl.VIEW.\"ix.houseware.category.service.CategorySubcategoriesServiceImpl\" ]"]}}}

       

       

       

      Any suggestion would be very appreciated.

      Thanks

      Sam

        • 1. Re: Can't deploy ear file in AS7.
          Sam W Expert

          I changed the AS to JBOSS 7.0.2Final, and now getting the following error during deployment:

           

           

          00:35:29,397 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "category5-ws-ear.ear"

          00:35:30,209 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "category5-ws-web.war"

          00:35:30,210 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "category5-ws-ejb.jar"

          00:35:30,239 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."category5-ws-ear.ear"."category5-ws-web.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."category5-ws-ear.ear"."category5-ws-web.war".PARSE: Failed to process phase PARSE of subdeployment "category5-ws-web.war" of deployment "category5-ws-ear.ear"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

                  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_07]

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

                  at java.lang.Thread.run(Thread.java:619) [:1.6.0_07]

          Caused by: java.lang.RuntimeException: ix.houseware.category.service.CategorySubcategoriesServiceImpl has the wrong component type, is cannot be used as a web component

                  at org.jboss.as.web.deployment.component.WebComponentProcessor.deploy(WebComponentProcessor.java:111)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                  ... 5 more

           

           

          00:35:30,241 INFO  [org.jboss.jpa] (MSC service thread 1-6) read persistence.xml for HousewareCategoryPU

          00:35:30,449 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "category5-ws-ear.ear" was rolled back with failure message {"Failed services" => {"jboss.deployment.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".PARSE: Failed to process phase PARSE of subdeployment \"category5-ws-web.war\" of deployment \"category5-ws-ear.ear\""}}

          00:35:30,452 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment category5-ws-ejb.jar in 2ms

          00:35:30,453 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment category5-ws-web.war in 3ms

          00:35:30,465 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Stopped deployment category5-ws-ear.ear in 15ms

          00:35:30,466 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.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"category5-ws-ear.ear\".\"category5-ws-web.war\".PARSE: Failed to process phase PARSE of subdeployment \"category5-ws-web.war\" of deployment \"category5-ws-ear.ear\""}}}}

           

          • 2. Re: Can't deploy ear file in AS7.
            Sam W Expert

            I am not sure what is wrong with my service interface and impl class during deployment for JBOSS 7.0.2.Final.

            Here is my interface class:

             

            inteface class:

             

            @WebService

            public interface CategorySubcategoriesService {

             

             

            Impl.java class:

             

            @WebService(endpointInterface = "ix.houseware.category.service.CategorySubcategoriesService")

            @Stateless()

            public class CategorySubcategoriesServiceImpl implements CategorySubcategoriesService {

             

            • 3. Re: Can't deploy ear file in AS7.
              Sam W Expert

              My web.xml file in the WAR module is shown as below:

               

               

              <?xml version="1.0" encoding="UTF-8"?>

              <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

               

               

                  <servlet>

                     

                      <display-name>CategorySubcategoriesServiceImpl</display-name>

                      <servlet-name>CategorySubcategoriesServiceImpl</servlet-name>

                      <servlet-class>

                              ix.houseware.category.service.CategorySubcategoriesServiceImpl

                      </servlet-class>

                  </servlet>

                  <servlet-mapping>

                      <servlet-name>CategorySubcategoriesServiceImpl</servlet-name>

                      <url-pattern>/services/*</url-pattern>

                  </servlet-mapping>

              </web-app>

               

              • 4. Re: Can't deploy ear file in AS7.
                Carlo de Wolf Master

                CategorySubcategoriesServiceImpl can not be both an EJB and a Servlet.

                • 5. Re: Can't deploy ear file in AS7.
                  Sam W Expert

                  Thank you very much for the correct answer.

                  I works now.