JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit jboss.naming.context.java.DefaultDSMissing
justin2013 Dec 27, 2013 6:46 AMHi,
Iam getting the below error when I start JBoss AS 7 standalone server in Windows 7.
16:07:16,875 ERROR
[org.jboss.as.server.deployment.scanner] (DeploymentScanner-t
hreads - 1)
{"JBAS014653: Composite operation failed and was rolled back. Steps
that failed:" =>
{"Operation step-2" => {"JBAS014771: Services with
missing/unavailable dependencies" =>
["jboss.persistenceunit.\"sample-afpj.war#forge-default
\"jboss.naming.context.java.DefaultDSMissing[jboss.persistenceunit.\"sample-afpj.war#forge-default\"jboss.naming.context.java.DefaultDS]"]}}}
My persistence.xml is given below:
xml version="1.0" encoding="UTF-8" standalone="no"?>
persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="forge-default" transaction-type="JTA">
<description>Forge Persistence Unit</description>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- Justin modified below line from constant to take from jboss HSQLDS -->
<!-- <jta-data-source>DefaultDS</jta-data-source> -->
<jta-data-source>java:jboss/datasources/DefaultDS</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.transaction.flush_before_completion" value="true"/>
</properties>
</persistence-unit>
</persistence>
Datasource configuration in standalone.xml is shown below:
<datasources>
<datasource jndi-name="java:jboss/datasources/DefaultDS" pool-name="DefaultDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/refapp</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql"/>
</drivers>
</datasources>
module.xml is here:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.18-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
I have followed steps as given in link:
https://zorq.net/b/2011/07/12/adding-a-mysql-datasource-to-jboss-as-7/
Could you kindly let me know how to resolve the same at earliest possible as iam doing poc which uses jboss as 7 datasource..
THanks.