Reputation: 3447
Let me start by saying I am a total noob in Java.
I am building a Jboss JSF app. I have a file called DefaultDS-ds.xml
with content:
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
<datasource jndi-name="java:jboss/datasources/DefaultDS" enabled="true"
use-java-context="true" pool-name="DefaultDS">
<connection-url>jdbc:mysql://localhost:3306/CinemaDb</connection-url>
<driver>mysql-connector-java-5.0.8-bin.jar</driver>
<pool></pool>
<security>
<user-name>root</user-name>
<password>test123</password>
</security>
</datasource>
</datasources>
and a persistence.xml
with content:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="user-unit">
<class>model.User</class>
<jta-data-source>java:jboss/datasources/DefaultDS</jta-data-source>
</persistence-unit>
</persistence>
however, when deploying my app I get:
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jboss.datasources.DefaultDS (missing) dependents: [service jboss.persistenceunit."dynamic-web.war#user-unit"]
I cannot seem to find the answer to this problem myself (if it is something simple - please accept my appologies), so can anyone help me?
EDIT: after fidling around with the folder structure, here is the new structure
dynamic-web
+---WEB-INF
¦ faces-config.xml
¦ web.xml
¦ DefaultDS-ds.xml
¦
+---classes
¦ ¦
¦ +---META-INF
¦ MANIFEST.MF
¦ persistence.xml
¦
+---lib
mysql-connector-java-5.0.8-bin.jar
and the new error:
16:40:00,475 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "mysql-connector-java-5.0.8-bin.jar" was rolled back with no failure message
16:40:00,479 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "dynamic-web.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.jboss/datasources/DefaultDSjboss.jdbc-driver.mysql-connector-java-5_0_8-bin_jarMissing[jboss.data-source.jboss/datasources/DefaultDSjboss.jdbc-driver.mysql-connector-java-5_0_8-bin_jar]"]}
16:40:00,483 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-11) JBAS010409: Unbound data source [jboss/datasources/DefaultDS]
16:40:00,487 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015877: Stopped deployment dynamic-web.war in 11ms
16:40:00,487 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment mysql-connector-java-5.0.8-bin.jar in 11ms
16:40:00,488 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.mysql-connector-java-5_0_8-bin_jar (missing) dependents: [service jboss.data-source.jboss/datasources/DefaultDS]
Upvotes: 0
Views: 250
Reputation: 3447
after switching out the jar file with a new one (this one) the deploy suceeded
Upvotes: 1