12 Replies Latest reply on Jul 12, 2012 10:53 AM by Pablo Srabstein

    EAR deployment failed with JBOSS 7.1.1Final.

    Sam W Expert

      Hi, I have an EAR file was able to deployed to 7.1.Alpha, but it failed in 7.1.1.Final.

      Here is its error logs:

       

       

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/Houseware]

       

       

      11:05:55,846 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.20:9990

      11:05:55,846 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 2071ms - Started 170 of 252 services (2 services failed or missing dependencies, 78 services are passive or on-demand)

      11:07:05,462 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "category6-ws-ear.ear"

      11:07:06,288 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "catetory6-ws-web.war"

      11:07:06,288 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "category6-ws-ejb.jar"

      11:07:06,570 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) JBAS011401: Read persistence.xml for HousewareCategoryPU

      11:07:06,699 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CategoryImagesFacade in deployment unit subdeployment "category6-ws-ejb.jar" of deployment "category6-ws-ear.ear" are as follows:

       

       

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

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

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

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

              java:app/category6-ws-ejb/CategoryImagesFacade

              java:module/CategoryImagesFacade

       

       

      11:07:06,700 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named CategorySubcategoriesFacade in deployment unit subdeployment "category6-ws-ejb.jar" of deployment "category6-ws-ear.ear" are as follows:

       

       

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

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

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

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

              java:app/category6-ws-ejb/CategorySubcategoriesFacade

              java:module/CategorySubcategoriesFacade

       

       

       

      11:07:06,891 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-7) Add Service

      id=CategoryImagesServiceImpl

      address=http://localhost:8080/category6-ws-web/CategoryImagesServices

      implementor=ix.houseware.category.service.CategoryImagesServiceImpl

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

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

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

      wsdlLocation=null

      mtomEnabled=false

      11:07:06,892 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-7) Add Service

      id=CategorySubcategoriesServiceImpl

      address=http://localhost:8080/category6-ws-web/CategoryServices

      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

      11:07:07,130 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-7) Creating Service {http://service.category.houseware.ix/}CategoryImagesServiceImplService from class ix.houseware.category.service.CategoryImagesService

      11:07:07,639 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-7) Setting the server's publish address to be http://localhost:8080/category6-ws-web/CategoryImagesServices

      11:07:07,754 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-7) WSDL published to: file:/usr/local/users/jboss/jboss711Final/standalone/data/wsdl/category6-ws-ear.ear/catetory6-ws-web.war/CategoryImagesServiceImplService.wsdl

      11:07:07,758 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-7) Creating Service {http://service.category.houseware.ix/}CategorySubcategoriesServiceImplService from class ix.houseware.category.service.CategorySubcategoriesService

      11:07:07,872 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-7) Setting the server's publish address to be http://localhost:8080/category6-ws-web/CategoryServices

      11:07:07,917 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-7) WSDL published to: file:/usr/local/users/jboss/jboss711Final/standalone/data/wsdl/category6-ws-ear.ear/catetory6-ws-web.war/CategorySubcategoriesServiceImplService.wsdl

      11:07:07,922 INFO  [org.jboss.as.webservices] (MSC service thread 1-1) JBAS015539: Starting service jboss.ws.port-component-link

      11:07:07,933 INFO  [org.jboss.as.webservices] (MSC service thread 1-1) JBAS015539: Starting service jboss.ws.endpoint."category6-ws-ear.ear"."catetory6-ws-web.war".CategorySubcategoriesServiceImpl

      11:07:07,933 INFO  [org.jboss.as.webservices] (MSC service thread 1-6) JBAS015539: Starting service jboss.ws.endpoint."category6-ws-ear.ear"."catetory6-ws-web.war".CategoryImagesServiceImpl

      11:07:07,938 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-1) register: jboss.ws:context=category6-ws-web,endpoint=CategorySubcategoriesServiceImpl

      11:07:07,944 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-6) register: jboss.ws:context=category6-ws-web,endpoint=CategoryImagesServiceImpl

      11:07:08,011 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /category6-ws-web

      11:07:08,215 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "category6-ws-ear.ear" was rolled back with failure message JBAS014750: Operation handler failed to complete

      11:07:08,216 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "JBAS014750: Operation handler failed to complete"}}

      11:07:08,246 INFO  [org.jboss.as.webservices] (MSC service thread 1-8) JBAS015540: Stopping service jboss.ws.endpoint."category6-ws-ear.ear"."catetory6-ws-web.war".CategoryImagesServiceImpl

      11:07:08,247 INFO  [org.jboss.as.webservices] (MSC service thread 1-4) JBAS015540: Stopping service jboss.ws.endpoint."category6-ws-ear.ear"."catetory6-ws-web.war".CategorySubcategoriesServiceImpl

      11:07:08,247 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-8) remove: jboss.ws:context=category6-ws-web,endpoint=CategoryImagesServiceImpl

      11:07:08,247 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-4) remove: jboss.ws:context=category6-ws-web,endpoint=CategorySubcategoriesServiceImpl

      11:07:08,253 INFO  [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015540: Stopping service jboss.ws.port-component-link

      11:07:08,280 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment category6-ws-ejb.jar in 64ms

      11:07:08,289 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment catetory6-ws-web.war in 73ms

      11:07:08,298 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment category6-ws-ear.ear in 82ms

       

       

      What might have gone wrong with my project?

      Thanks

      Sam

        • 1. Re: EAR deployment failed with JBOSS 7.1.1Final.
          Sam W Expert

          I also manually created mysql driver in the following directory:

           

           

          ./modules/com/mysql

          ./modules/com/mysql/main/mysql-connector-java-5.1.15.jar

          ./modules/com/mysql/main/mysql-connector-java-5.1.15.jar.index

           

          But it still showing the following error on jboss start up:

           

          JBAS014775:    New missing/unsatisfied dependencies:

                service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/Houseware]

           

          11:19:28,500 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.20:9990

          11:19:28,501 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 2184ms - Started 170 of 252 services (2 services failed or missing dependencies, 78 services are passive or on-demand)

           

          I forgot how to add mysql driver to jboss.

          Thanks

          Sam

          • 2. Re: EAR deployment failed with JBOSS 7.1.1Final.
            Carsten Maneg Newbie

            Hello Sam,

             

            and what about the module.xml in /modules/com/mysql/main ?

            Did you create one?

            If yes, how does it looks like and your datasource configuration in standalone*.xml?

             

            Cheers

            Carsten

            • 3. Re: EAR deployment failed with JBOSS 7.1.1Final.
              Sam W Expert

              Thank you for your fast response.

              module.xml file is shown as below:

               

               

              <module xmlns="urn:jboss:module:1.0" name="com.mysql">

                <resources>

                  <resource-root path="mysql-connector-java-5.1.15-bin.jar"/>

                </resources>

                <dependencies>

                  <module name="javax.api"/>

                </dependencies>

              </module>

               

               

              I use standalone-full.xml file, its relevant drivers configuration is:

               

              <drivers>

                                      <driver name="com.mysql" module="com.mysql">

                                      <xa-datasource-class>

                                          com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

                                      </xa-datasource-class>

                                  </driver>

               

               

                                  <driver name="h2" module="com.h2database.h2">

                                      <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                  </driver>

               

               

                              </drivers>

               

              files in module/com/mysql/main/ are:

              ls -l

              total 818

              -rw-r--r--  1 jboss  jboss     265 Jul  5 11:31 module.xml

              -rw-r--r--  1 jboss  jboss  817285 Jul  5 11:18 mysql-connector-java-5.1.15.jar

               

              Thanks a lot

              Sam

              • 4. Re: EAR deployment failed with JBOSS 7.1.1Final.
                Carsten Maneg Newbie

                Did you install the driver with the jboss tool jboss-cli.bat?

                Is there a '...jar.index' file or not?

                And what about the datasource configuration in standalone-full.xml?

                 

                One difference I found so far in module.xml (but not the point I guess):

                xmlns="urn:jboss:module:1.0"

                In my file (7.1.1.Final as well) it is

                xmlns="urn:jboss:module:1.1"

                • 5. Re: EAR deployment failed with JBOSS 7.1.1Final.
                  Sam W Expert

                  I tried  ./jboss-cli.sh --connect controller=localhost:3306

                  but it thrown error exception:

                   

                  > ./jboss-cli.sh --connect controller=localhost

                  org.jboss.as.cli.CliInitializationException: Failed to connect to the controller

                          at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:229)

                          at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:207)

                          at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)

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

                          at org.jboss.modules.Module.run(Module.java:260)

                          at org.jboss.modules.Main.main(Main.java:291)

                  Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at localhost:9999

                          at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:639)

                          at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:613)

                          at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:227)

                          ... 8 more

                  However if i manually connect to mysql, it works:

                  mysql -u root -p

                  Enter password:

                  There is an index file generated in my old 7.1A folder, can I simply copy it over to 7.1.1.Final?

                  Thanks

                  Sam

                  • 6. Re: EAR deployment failed with JBOSS 7.1.1Final.
                    Carsten Maneg Newbie

                    Well, I guess you can copy. Just try.

                    You haven't shown your datasource configuration.

                    Have you already checked that <driver>com.mysql</driver>? Maybe just a typo???

                    Must be same like <driver name="com.mysql" module="com.mysql">

                    • 7. Re: EAR deployment failed with JBOSS 7.1.1Final.
                      Sam W Expert

                      Thank you for the suggestion.

                      Here is the configuration of standalone-full.xml:

                       

                      <datasources>

                                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                                          <driver>h2</driver>

                                          <security>

                                              <user-name>sa</user-name>

                                              <password>sa</password>

                                          </security>

                                      </datasource>

                                      <datasource jndi-name="java:jboss/datasources/Houseware" pool-name="Houseware">

                                          <connection-url>

                                              jdbc:mysql://localhost:3306/houseware

                                          </connection-url>

                                          <driver>

                                              com.mysql

                                          </driver>

                                          <transaction-isolation>

                                              TRANSACTION_READ_COMMITTED

                                          </transaction-isolation>

                                          <pool>

                                              <min-pool-size>

                                                  10

                                              </min-pool-size>

                                              <max-pool-size>

                                                  100

                                              </max-pool-size>

                                              <prefill>

                                                  true

                                              </prefill>

                                          </pool>

                                          <security>

                                              <user-name>

                                                  pass

                                              </user-name>

                                              <password>

                                                  pass

                                              </password>

                                          </security>

                                      </datasource>

                       

                                     <drivers>

                                              <driver name="com.mysql" module="com.mysql">

                                              <xa-datasource-class>

                                                  com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

                                              </xa-datasource-class>

                                          </driver>

                       

                       

                                          <driver name="h2" module="com.h2database.h2">

                                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                          </driver>

                       

                       

                                      </drivers>

                       

                      • 8. Re: EAR deployment failed with JBOSS 7.1.1Final.
                        Carsten Maneg Newbie

                        Well, what do you think about enabled="true" use-java-context="true" for your datasource?

                        Like <datasource jndi-name="java:jboss/datasources/Houseware" pool-name="Houseware"enabled="true" use-java-context="true" >

                         

                        Ok, just a question of style but I would suggest to remove all these line breaks in your datasource configuration.

                        standalone-full.xml has quite a bit of lines already...

                        • 9. Re: EAR deployment failed with JBOSS 7.1.1Final.
                          Sam W Expert

                          I changed the standalone-full.xml to the code as shown below:

                           

                          <datasource jndi-name="java:jboss/datasources/Houseware" pool-name="Houseware" enabled="true" use-java-context="true" >

                                                  <connection-url>jdbc:mysql://localhost:3306/houseware</connection-url>

                                                  <driver>mysql-connector-java-5.1.21-bin.jar</driver>

                                                  <security>

                                                          <user-name>me</user-name>

                                                          <password>mypass</password>

                                                  </security>

                                          </datasource>

                           

                           

                           

                          when started up, jboss shown the following error on console:

                          JBAS014775:    New missing/unsatisfied dependencies:

                                service jboss.jdbc-driver.mysql-connector-java-5_1_21-bin_jar (missing) dependents: [service jboss.data-source.java:jboss/datasources/Houseware]

                           

                           

                          06:25:29,141 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.20:9990

                          06:25:29,141 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 2074ms - Started 170 of 252 services (2 services failed or missing dependencies, 78 services are passive or on-demand)

                          ls -l modules/com/mysql/main:

                           

                          -rw-r--r--  1 jboss  jboss     265 Jul  6 05:23 module.xml

                          -rw-r--r--  1 jboss  jboss  817285 Jul  5 11:18 mysql-connector-java-5.1.15.jar

                          -rw-r--r--  1 jboss  jboss  827942 Jul  6 06:20 mysql-connector-java-5.1.21-bin.jar

                           

                          I have used the following steps to add mysql driver into jboss:

                           

                          cd ~/server/jboss-as-7.1.1.Final

                          bin/jboss-cli.sh

                          connect

                          deploy ~/server/downloads/mysql-connector-java-5.1.21/mysql-connector-java-5.1.21-bin.jar

                          quit

                           

                          Any more idea?

                          Thanks

                          Sam

                          • 10. Re: EAR deployment failed with JBOSS 7.1.1Final.
                            Carsten Maneg Newbie

                            It is easier when you show datasource and driver configuration or <subsystem xmlns="urn:jboss:domain:datasources:1.1"> completely.

                            Now you use driver name <driver>mysql-connector-java-5.1.21-bin.jar</driver>.

                            Looks wrong. Or did you change

                            <drivers>

                                   <driver name="com.mysql" module="com.mysql">

                            as well?

                            • 11. Re: EAR deployment failed with JBOSS 7.1.1Final.
                              Sam W Expert

                              Finally I got that working.

                              Really thank you so much.

                              Cheers

                              Sam

                              • 12. Re: EAR deployment failed with JBOSS 7.1.1Final.
                                Pablo Srabstein Newbie

                                Sm W , How did you solve eventually?

                                 

                                Thanks,

                                Pablo.