2 Replies Latest reply on Sep 26, 2011 2:38 PM by wdfink

    Persistent Unit is missing - JBOSS 6.0

    samwun9988

      Hi,

       

      When I deploy a WAR file which consist of CXF2 and JPA/Perseistence layer to JBOSS 6.0.Final, JBOSS throws the following error:

       

       

      21:22:35,334 WARN  [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.

      21:22:35,334 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] Add Service

      id=CXFCategoryServlet

      address=http://portal.ixsystems.com.au:80/category-ws-0.0.1-SNAPSHOT/services

      implementor=ix.houseware.category.service.CategoryWebServiceImpl

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

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

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

      wsdlLocation=null

      mtomEnabled=false

      21:22:35,334 INFO  [org.jboss.wsf.framework.management.DefaultEndpointRegistry] register: jboss.ws:context=category-ws-0.0.1-SNAPSHOT,endpoint=CXFCategoryServlet

      21:22:36,505 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Creating Service {http://service.category.houseware.ix/}CategoryWebService from class ix.houseware.category.service.CategoryWebService

      21:22:36,538 INFO  [org.apache.cxf.endpoint.ServerImpl] Setting the server's publish address to be http://portal.ixsystems.com.au:80/category-ws-0.0.1-SNAPSHOT/services

      21:22:36,545 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] WSDL published to: file:/usr/local/users/jboss/jboss6/server/default/data/wsdl/category-ws-0.0.1-SNAPSHOT.war/CategoryWebService.wsdl

      21:22:56,348 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/category-ws-0.0.1-SNAPSHOT

      21:22:56,370 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "persistence.unit:unitName=category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU" is missing the following dependencies:

          Dependency "jboss.jca:name=jboss/datasources/Houseware,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=jboss/datasources/Houseware,service=DataSourceBinding' **")

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "jboss.jca:name=jboss/datasources/Houseware,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=jboss/datasources/Houseware,service=DataSourceBinding' **

       

       

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

              at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_03-p4]

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) [:1.6.0_03-p4]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) [:1.6.0_03-p4]

              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]

       

       

      Here is my src/main/resources/META-INF/persistence.xml file:

       

       

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

      <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

        <persistence-unit name="HousewareCategoryPU" transaction-type="JTA">

          <provider>org.hibernate.ejb.HibernatePersistence</provider>

          <jta-data-source>java:jboss/datasources/Houseware</jta-data-source>

          <exclude-unlisted-classes>false</exclude-unlisted-classes>

          <properties>

            <property name="hibernate.hbm2ddl.auto" value="update"/>

          </properties>

        </persistence-unit>

      </persistence>

       

       

      src/main/setup/jboss-ds.xml file:

       

       

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

      <datasources>

        <local-tx-datasource>

          <jndi-name>Houseware</jndi-name>

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

          <driver-class>com.mysql.jdbc.Driver</driver-class>

          <user-name>samsam9988</user-name>

          <password>admin9988</password>

          <min-pool-size>5</min-pool-size>

          <max-pool-size>20</max-pool-size>

          <idle-timeout-minutes>5</idle-timeout-minutes>

        </local-tx-datasource>

        <local-tx-datasource>

          <jndi-name>HOUSEWARE</jndi-name>

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

          <driver-class>com.mysql.jdbc.Driver</driver-class>

          <user-name>root</user-name>

          <password>admin</password>

          <min-pool-size>5</min-pool-size>

          <max-pool-size>20</max-pool-size>

          <idle-timeout-minutes>5</idle-timeout-minutes>

        </local-tx-datasource>

      </datasources>

       

       

      What is happening? why JBOSS 6 could not found my application persistent Unit?

       

      Any suggestion is very appreciated.

      Thanks

      Sam