Wednesday, April 15, 2020

JBOSS: JBAS014775: New missing/unsatisfied dependencies:




>PROBLEM


Starting JBoss, the server fails to load datasource throwing the following message:

18:21:37,781 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/mysqlTestoneDS, service jboss.data-source.java:jboss/datasources/proeducacaoDS] 


>SOLUTION

Check the configuration and change driver.
You may choose checking on or other in first place. It on your guess.

 

CHECKING DATASOURCE CONFIGURATION

standalone.xml
Go to JBoss install dir and open the standalone.xml file.
For instance:
D:\jboss-as-7.1.1.Final_8080\standalone\configuration\standalone.xml

The configuration shall be something like this:




DATABASE MODULE
Go to JBoss install dir under modules\com\mysql\main folder.
For example:
D:\portables_d\jboss-as-7.1.1.Final_8080\modules\com\mysql\main

Open file the file having .index suffix.
Example:
mysql-connector-java-5.1.13-bin.jar.index




Compare with the configuration in the standalone.xml file:

                    
<driver name="mysql" module="com.mysql">
   <driver-class>com.mysql.jdbc.Driver</driver-class>
</driver>

                    

In this case, they match.
The required class is present in the jar of the database's driver.
If the configuration is ok, then it is time to test another version for the driver.

 


SWITCHING DRIVERS


Replace the current driver for a new one.





In this case, switching to a newer driver it was enough.




Restart JBoss.

RESULT

SUCCESS





>ENV

jboss-as-7.1.1.Final
Windows 10
Mysql 5.X

No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...