New missing / unsatisfied dependencies: service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/MyDB]

I am using JBoss 7.1.1. When I try to start the server, I get an exception. I tried many solutions, but nothing works.

The following line is displayed in the logs -

New missing/unsatisfied dependencies: service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/MyDB]

Here is my standalone.xml:

 </datasource> <datasource jta="true" jndi-name="java:jboss/MyDB" pool-name="MyDB_Pool" enabled="true" use-java-context="true" use-ccm="true"> <connection-url>jdbc:mysql://localhost:3306/test</connection-url> <driver>com.mysql</driver> <security> <user-name>root</user-name> <password>root</password> </security> <timeout> <idle-timeout-minutes>0</idle-timeout-minutes> <query-timeout>600</query-timeout> </timeout> <statement> <prepared-statement-cache-size>100</prepared-statement-cache-size> <share-prepared-statements>true</share-prepared-statements> </statement> </datasource> <drivers> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> </driver> <driver name="com.mysql" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources> 

This is my module.xml:

 <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.24-bin.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="javax.servlet.api" optional="true"/> <module name="javax.validation.api"/> </dependencies> </module> 

But I still got this exception

Here is my web.xml (part of it):

 <resource-ref id="ResourceRef_1"> <res-ref-name>MyDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> <lookup-name>java:jboss/datasources/MyDB</lookup-name> </resource-ref> 

Can anyone help?

+7
java jboss
source share
4 answers

Your module.xml should look like this:

 <module xmlns="urn:jboss:module:1.0" name="com.mysql" slot="main"> <resources> <resource-root path="mysql-connector-java-5.1.24-bin.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module> 

And make sure you have mysql-connector-java-5.1.24-bin.jar and mysql-connector-java-5.1.24-bin.jar.index in the same folder where you have module.xml .

+2
source share

Solved: new missing / unsatisfied dependencies: service jboss.jdbc-driver.com_ for Jboss / WildFly 10

Hi, first stop the WildFly server. then update the standalone.xml file to add detailed MS-SQL JTDS driver information and Datasource data, as shown below:

 <subsystem xmlns="urn:jboss:domain:datasources:4.0"> <datasources> <datasource jta="true" jndi-name="java:/jdbc/speedtest-datasource" pool-name="MSSQLDSspeedTestDEV" enabled="true" use-ccm="true"> <connection-url>jdbc:jtds:sqlserver://serverName:1433;DatabaseName=dbName</connection-url> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> <driver>JTDS</driver> <security> <user-name>username</user-name> <password>password</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/> <background-validation>true</background-validation> </validation> </datasource> <drivers> <driver name="JTDS" module="net.sourceforge"> <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> </driver> </drivers> </datasources> </subsystem> 

Module.xml for MS SQL JTDS: path: E: \ Softwares \ wildfly.10.1.0.Final \ wildfly.10.1.0.Final \ modules \ system \ layers \ base \ net \ sourceforge \ main (you must create the directory structure as highlighted and add module.xml and jtds-1.3.0.jar files).

(note that in this example I used the module name as "net.sourceforge" and created the folder structure path as "net \ sourceforge \ main"). Note that this is more important for matching the directory path and module name in the module, xml file.

 <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="net.sourceforge"> <resources> <resource-root path="jtds-1.3.0.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module> 

Note. Please note that the path highlighted in green above in 2 places must match (for example, the directory structure and module name in the .xml module),

For example. If you created a directory structure like E: \ Softwares \ wildfly.10.1.0.Final \ wildfly.10.1.0.Final \ modules \ system \ layers \ base \ net \ sourceforge \ jtds \ main, then the module name in module.xml the file should be "net.sourceforge.jtds", as shown below in module.xml

 Module.xml: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds"> <resources> <resource-root path="jtds-1.3.0.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module> 

now save these two files and restart the wildFLY server.

 Regards, Rasool Javeed Mohammad javeed.mca@gmail.com 
+2
source share

try updating your mysql connector. I tried to deploy 5.1.5 (I switched from jboss 5.1 to 7.1.1, so I just moved the working environment to a new container). after I hit my head about this for two days, I upgraded to 5.1.27 and the data source was deployed as a champion.

0
source share

Try removing META-INF / services / java.sql.Driver from the mysql lib connector.

0
source share

All Articles