-
1. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
mayerw01 Sep 2, 2018 5:31 AM (in response to mayerw01)When I choose "Custom" to specify my own settings the connection works.
So there seems to be an issue with the predefined templates
-
2. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
george.labuschagne Sep 2, 2018 12:12 PM (in response to mayerw01)I also had database connection issues with WildFly 14 trying to setup a data source for PostgreSQL. In the end I copied my WildFly 13 data source config portion overriding the WildFly 14 portion and all works well.
Something most definitely changed with the default setup from 13 to 14...
-
3. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
claudio4j Sep 4, 2018 11:34 AM (in response to mayerw01)Indeed, there is a bug selecting the mysql template, we are going to fix it.
As a workaround you should:
1) add the jdbc driver as a module and add them in in jdbc-driver and set the datasource class name and xa datasource class name.
2) Use the wizard to add the datasource and select the Custom template, in the JDBC Driver step, selects the jdbc-driver
You can follow the issue progression, I expect to fix it this or next week.
[HAL-1516] Fix wizard for datasource creation when a template is selected - JBoss Issue Tracker
Thanks for reporting.
-
4. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
mayerw01 Sep 5, 2018 4:17 AM (in response to claudio4j)There might be a general problem in the templates, not just for MySql
-
5. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
nowoe Sep 10, 2018 3:13 AM (in response to claudio4j)Came across this thread since I got
17:21:19,860 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 41) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "postgresql")
]) - failure description: "WFLYJCA0114: Failed to load datasource class: org.postgresql.Driver"
The solution was to remove <xa-datasource-class> from driver configuration in standalone.xml. So this driver configuration causes above error:
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.Driver</xa-datasource-class>
</driver>
while this works fine:
<driver name="postgresql" module="org.postgresql">
</driver>
Is this a bug (it was working fine throughout wildfly 8 - 13), and is it perhaps related?
-
6. Re: WildFly-14: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
mayerw01 Sep 10, 2018 4:34 AM (in response to nowoe)I can't believe that this is working in WildFly 8-13.
The xa-datasource-class for postgres is org.postgresql.xa.PGXADataSource