Discussion:
[jboss-user] [Datasource Configuration] - Fedora vs Windows 7 MySql Driver
paul arber
2013-08-22 17:44:25 UTC
Permalink
paul arber [https://community.jboss.org/people/paularber] created the discussion

"Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833591#833591

--------------------------------------------------------------
I am running jobss eap 6.1, and develop on my desktop and would like to have a server where I install checkpoint relases.  The desktop runs Windows 7, Jboss eap 6.1 and has a MySql datasource configured to use MySql on a remote server, all is working well.  I installed Jboss eap 6.1 on Fedora 19 and attempted to configure the same MySql datasource but when I start Jboss I get:

12:40:00,555 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 31) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "mysql")
]) - failure description: "JBAS010441: Failed to load module for driver [com.mysql]"

On both systems I installed MySql jdbc driver as a module  in JBOSS/module/com/mysql/main.  I have the same module.xml and the same <driver> definitions but on Fedora I get the above error.  I have searched the net for similar issues, searched my definitions for any differences in the deployment and I have not found any solution. Has anyone come across this problem?

standalone-full.xml
               ...
                <datasource jndi-name="java:jboss/datasources/myDS" pool-name="myDS" enabled="true" use-java-context="true">
                   <connection-url>jdbc:mysql://192.168.1.201:3306/jboss</connection-url>
                   <driver>mysql</driver>
                   <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                   <pool>
                        <min-pool-size>2</min-pool-size>
                        <max-pool-size>10</max-pool-size>
                   </pool>
                   <security>
                        <user-name>jboss</user-name>
                        <password>jboss</password>
                   </security>
                   <statement>
                        <prepared-statement-cache-size>100</prepared-statement-cache-size>
                        <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="mysql" module="com.mysql">
                        <driver-class>com.mysql.jdbc.Driver</driver-class>
                    </driver>
                </drivers>
               ...

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.25-bin.jar"/>    
          </resources>    
     <dependencies>       
           <module name="javax.api"/>        
          <module name="javax.transaction.api"/>   
     </dependencies>
      </module>                                     
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833591#833591]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
paul arber
2013-08-22 19:01:12 UTC
Permalink
paul arber [https://community.jboss.org/people/paularber] created the discussion

"Re: Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833595#833595

--------------------------------------------------------------
I followed the instructions in the article by Pirabu G regarding installing postgress jdbc driver but used the MySql driver and it seems to work.  I can install the MySql driver as a module under Windows 7 but if I follow the same procedures it fails under Fedora 19.  If I copy the MySql jdbc driver jar to the deployment directory,  I can configure the datasource without any problems.  But installing MySql jdbc driver as a module does not work....
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833595#833595]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
Wolf-Dieter Fink
2013-08-22 19:24:32 UTC
Permalink
Wolf-Dieter Fink [https://community.jboss.org/people/wdfink] created the discussion

"Re: Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833597#833597

--------------------------------------------------------------
I can use MySQL as module with Fedora18, I don't see a problem.
If it works on Win, you might copy the directory to your Linux installation.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833597#833597]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
paul arber
2013-08-22 19:37:42 UTC
Permalink
paul arber [https://community.jboss.org/people/paularber] created the discussion

"Re: Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833599#833599

--------------------------------------------------------------
Thanks,  I will copy the Jboss install from Windows to Fedora and try it.  Will let you know if its fat finger syndrom.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833599#833599]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
paul arber
2013-08-22 23:34:03 UTC
Permalink
paul arber [https://community.jboss.org/people/paularber] created the discussion

"Re: Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833618#833618

--------------------------------------------------------------
mea culpa... I copied the jboss-eap-6.1 directory from the windows machine to Fedora and all works fine... egg on my face...
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833618#833618]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
Wolf-Dieter Fink
2013-08-23 11:30:41 UTC
Permalink
Wolf-Dieter Fink [https://community.jboss.org/people/wdfink] created the discussion

"Re: Fedora vs Windows 7 MySql Driver"

To view the discussion, visit: https://community.jboss.org/message/833670#833670

--------------------------------------------------------------
NP, sometimes you will overlook the same mistake several times ;)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833670#833670]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
Loading...