3

The server startup error message is:

16:08:37,829 ERROR [org.jboss.as.controller.management-operation] (ServerService
 Thread Pool -- 27) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "firebird")
]) - failure description: "JBAS010441: Failed to load module for driver [org.fir
ebirdsql]"

Content of module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.firebirdsql">
  <resources>
    <resource-root path="jaybird-2.2.5.jar"/>
  </resources>
  <dependencies>
    <module name="javax.api"/>
    <module name="javax.resource"/>
    <module name="javax.transaction.api"/>
  </dependencies>
</module>

Driver definition in standalone.xml:

<driver name="firebird" module="org.firebirdsql">
  <driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
</driver>

(Based on http://masterjboss.blogspot.de/2014/03/how-to-configure-mysql-jdbc-driver-in.html)

A similar problem (without accepted answer): Db2 Driver/Datasource setup on wildfly: Failed to load module for driver [com.ibm]

Community
  • 1
  • 1
mjn
  • 36,362
  • 28
  • 176
  • 378
  • 1
    Jaybird is distributed with a version specific for a Java version, are you using the version that is for your Java version. Also look in the logs if it has a more specific error. – Mark Rotteveel Aug 18 '14 at 15:08
  • @MarkRotteveel I used the Java 1.6 version of the JAR first, but with the 1.7 jar the same error occurs. Also the server.log does not show more details - I guess I have to use a debug log level (but the deployment error message should be clearer imho) – mjn Aug 19 '14 at 09:42
  • 1
    I see you edited your question to use `jaybird-full`, did you always use this jar? You should **not** use `jaybird-full` when deploying to an application server: it includes classes from `javax.resource` which are provided by Wildlfy. I am not 100% sure, but I believe that it will refuse to load a jar if it contains classes from `javax.resource` (and some other package roots). Instead you should use the 'normal' jaybird jar. Otherwise I will try to reproduce this. – Mark Rotteveel Aug 19 '14 at 10:32
  • @MarkRotteveel I am using the smaller jar file now again, many thanks for your hint – mjn Aug 19 '14 at 11:40
  • Does this also mean that you solved the problem? Your module descriptor is almost identical to one I have in a JBoss 6.2 deployment (except mine had `xmlns="urn:jboss:module:1.0"`, but as far as I can tell that shouldn't make a difference). – Mark Rotteveel Aug 21 '14 at 12:56
  • @MarkRotteveel the problem still exists, I only reverted the code example to jaybird-2.5.5.jar – mjn Aug 22 '14 at 11:07
  • @MarkRotteveel I downloaded the "Java EE7 Full & Web Distribution" from http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.zip – mjn Aug 24 '14 at 09:24

2 Answers2

4

Replace <module name="javax.resource"/> with <module name="javax.resource.api"/> in the dependencies section.

asohun
  • 331
  • 3
  • 7
  • 1
    Good catch! I have read this question several times and had never noticed that difference between my working config and the config in this question! I can confirm that this gives the same error as in the question. – Mark Rotteveel Aug 25 '14 at 11:37
1

I have installed WildFly 8.1 and added the module under:

<wildfly-root>\modules\org\firebirdsql\main\
                                            module.xml
                                            jaybird-2.2.5.jar

Note that this doesn't match the location used in the tutorial you link to. The tutorial - incorrectly - roots user modules in modules\system\layers\base instead of modules\, but when I place the module there it works as well.

My module.xml definition has content:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.firebirdsql">
  <resources>
    <resource-root path="jaybird-2.2.5.jar"/>
  </resources>
  <dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
    <module name="javax.resource.api"/>
  </dependencies>
</module>

I added the driver entry to standalone.xml exactly as you posted. And then added a datasource in the management console, and tested the connection.

This works. My earlier theory in the comments that it isn't working for you due to the Web Profile not including Resource Connectors seems to be wrong. I have also tested using a Java 8 version of Jaybird when WildFly is running on Java 7, but this gives an UnsupportedClassVersionError as expected.

The only way I have been able get the error in your question is to intentionally misplace the module (eg deleting it entirely, having a spelling error in the folder names, or putting it in the wrong location). I would suggest that you carefully check your module location (see above).


See the answer by asohun for the solution to your specific problem. I will leave this answer in place as it contains the correct config and an alternative failure mode that produces the same error.

Community
  • 1
  • 1
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197