2 Replies Latest reply on Jun 24, 2011 7:25 AM by stephan972

    Problem while deploying WAR file ; missing dependencies

    stephan972

      Hi,

       

        I have a war file that I deploy to my jboss server. The war contains a persistence.xml that references a jta-data-source.

      This jta-data-source is already successfully deployed on jboss with its -ds.xml file.

       

         Unfortunately, when I deploy the war file, jboss doesn't seem to find the jta-data-srouce.

       

      Here is my -ds.xml file

       

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

      <datasources>

          <local-tx-datasource>

              <jndi-name>recordDS</jndi-name>

              <connection-url>jdbc:postgresql://myhost:5435/rec</connection-url>

              <driver-class>org.postgresql.Driver</driver-class>

              <user-name>rec</user-name>

              <password>rec</password>

          </local-tx-datasource>

      </datasources>

       

      Jboss output when it deploys -ds.xml file

      (...)

      INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=recordDS' to JNDI name 'java:recordDS'

      (...)


       

      Here is my persistence.xml file

       

      <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="record-db" transaction-type="JTA">

              <jta-data-source>java:recordDs</jta-data-source>

              <properties>

                  <property name="hibernate.show_sql" value="false" />

                  <property name="hibernate.format_sql" value="true" />

       

                  <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />

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

                  <property name="hibernate.default_schema" value="rec" />

              </properties>

          </persistence-unit>

      </persistence>

       

       

      Jboss output when it deploys the war file containing this persistence.xml file

      (...)

      11:09:16,841 INFO  [TomcatDeployment] deploy, ctxPath=/record-webapp

      11:09:17,075 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/record-webapp'

      11:09:23,372 SEVERE [application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface.

      11:09:23,372 INFO  [application] JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

      11:09:26,591 WARN  [HDScanner] Failed to process changes

      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "persistence.unit:unitName=#record-db" is missing the following dependencies:

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

       

      DEPLOYMENTS IN ERROR:

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

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)

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

          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)

       

      I have noticed that there's a slight difference between jboss.jca:service=DataSourceBinding,name=recordDS when the -ds.xml file is deployed

      and jboss.jca:name=recordDs,service=DataSourceBinding the error reported.Is that the problem ? What am i missing ?

       

      Stephan

      ----------------------------

      JBoss 5.1.0.GA

      Java version: 1.6.0_20

      OS-System: Windows XP 5.1,x86