0

I have an EAR Application which contains a EJB App, WebApp and a Client jar.

I have created the datasources in WildFly with names as below:

java:jboss/datasources/NersTspDS
java:jboss/datasources/NersDS
java:jboss/datasources/NersMgtDS

While deploying the application I am getting the below error

Error in Wildfly Logs:

[org.jboss.as.controller.management-operation] (XNIO-1 task-10) WFLYCTL0013: Operation ("add") failed - address: ([{"deployment" => "NERSServer-1.0.ear"}]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersTspDS\" is missing [jboss.naming.context.java.jboss.datasources.NersTspDS]",
    "jboss.deployment.unit.\"NERSServer-1.0.ear\".deploymentCompleteService is missing [jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"WebServer-1.0.war\".deploymentCompleteService]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersMgtDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersMgtDS]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersMgtDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersMgtDS]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersDS]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersDS]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersTspDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersTspDS]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersMgtDS\" is missing [jboss.naming.context.java.jboss.datasources.NersMgtDS]",
    "jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"WebServer-1.0.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"WebServer-1.0.war\".beanmanager]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersTspDS\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.NersTspDS]",
    "jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"DBServer-1.0.jar\".component.LoginBean.START is missing [jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersDS\", jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersMgtDS\", jboss.persistenceunit.\"NERSServer-1.0.ear/WebServer-1.0.war#NersTspDS\"]",
    "jboss.persistenceunit.\"NERSServer-1.0.ear/DBServer-1.0.jar#NersDS\" is missing [jboss.naming.context.java.jboss.datasources.NersDS]",
    "jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"WebServer-1.0.war\".batch.environment is missing [jboss.deployment.subunit.\"NERSServer-1.0.ear\".\"WebServer-1.0.war\".bea
James R. Perkins
  • 16,800
  • 44
  • 60
Dipuraj
  • 51
  • 1
  • 6
  • There should be more to the error message than this. Look above this message in your logs. – James R. Perkins Sep 30 '15 at 21:54
  • This error indicates that you are referencing a datasource called NersMgtDS from your persistence.xml file, but it has not been defined yet in standalone.xml – maress Oct 02 '15 at 06:57

1 Answers1

0

The error was because I was using multiple Datasources in the persistence.xml of the application and I needed to enable the property to allow multiple data sources in the Standalone.sh file of WildFly. After adding this property the error is gone.

Dipuraj
  • 51
  • 1
  • 6