Services with Missing / Inaccessible Dependencies

Any idea why I am getting this error:

JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.jboss/datasources/UserDS] 

 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) `{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.jboss/datasources/UserDSjboss.jdbc-driver.com_mysql_jdbcMissing[jboss.data-source.jboss/datasources/UserDSjboss.jdbc-driver.com_mysql_jdbc]"]}}}` 

persistence.xml

 <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.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_2_0.xsd"> <persistence-unit name="primary"> <jta-data-source>java:jboss/datasources/UserDS</jta-data-source> <properties> <!-- Properties for Hibernate --> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <property name="hibernate.show_sql" value="true" /> </properties> </persistence-unit> </persistence> 

mydatasource-ds.xml

  <?xml version="1.0" encoding="UTF-8"?> <datasources xmlns="http://www.jboss.org/ironjacamar/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> <datasource jndi-name="java:jboss/datasources/UserDS" pool-name="kitchensink-quickstart" enabled="true" use-java-context="true"> <!-- jdbc:h2:mem:kitchensink-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 --> <connection-url> jdbc:mysql://localhost:3306/test </connection-url> <driver>mysql</driver> <security> <user-name>root</user-name> <password>root</password> </security> </datasource> </datasources> 

module.xml

 <module xmlns="urn:jboss:module:1.0" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.22.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module> 
+4
source share
2 answers

the cause of the error is because you are missing the java dependency: jboss / datasources / UserDS. With Jboss 7.x +, these data sources can be added directly to the application server configuration, as you have discovered.

the difference between a stand-alone and a domain configuration is a stand-alone configuration, intended for only one application server with the specified configuration. If you look closely at domain.xml, you will see several configurations of the application server (aka profiles). They will be very similar to stand-alone, stand-alone, stand-alone, stand-alone, fully-ha configuration files located in the standalone / conf * directory. Working in domain mode allows you to manage many different server instances running in that domain from a central location (that is, a domain controller). (this includes cluster nodes, if configured)

This is closely related to your initial question in that the domain controller has the ability to gracefully use this data source configuration for all of its nodes.

+3
source

If you specify a data source as a link to a resource in web.xml, then exactly match this name with the name standalone.xml (or domain.xml):

web.xml

  <resource-ref> <res-ref-name>java:jboss/datasources/OracleDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> 

standalone.xml

 <datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="false"> 
+4
source

All Articles