-
1. Re: Can't create MySQL datasource in WildFly 9 CR1
jaysensharma May 9, 2015 12:07 AM (in response to lpeter91)Hello,
Does not look like a problem with WildFly9 as i tried the following on a fresh wildfly9 instance and it worked fine.
Step-1).
======== Deployed the driver "mysql-connector-java-5.1.13-bin.jar" to standalone instance of wildfly 9
09:26:28,466 INFO [org.jboss.as.repository] (XNIO-1 task-6) WFLYDR0001: Content added at location /JBoss_WildFly/wildfly-9.0.0.CR1-SNAPSHOT/standalone/data/content/63/1249c6055be15a1fab26b3c28a3e5c6f3d97e0/content
09:26:28,574 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "mysql-connector-java-5.1.13-bin.jar" (runtime-name: "mysql-connector-java-5.1.13-bin.jar")
09:26:28,664 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
09:26:28,668 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.13-bin.jar
09:26:28,734 INFO [org.jboss.as.server] (XNIO-1 task-2) WFLYSRV0010: Deployed "mysql-connector-java-5.1.13-bin.jar" (runtime-name : "mysql-connector-java-5.1.13-bin.jar")
Step-2).
======== Created DataSource as following using CLI and then tested:
[standalone@localhost:9990 /]
[standalone@localhost:9990 /] /subsystem=datasources/data-source=MusicDS:add(jndi-name=java:/MusicDS,connection-url="jdbc:mysql://localhost:3306/testDB",driver-name=mysql-connector-java-5.1.13-bin.jar,user-name=root,password=test456)
{"outcome" => "success"}
[standalone@localhost:9990 /]
[standalone@localhost:9990 /] /subsystem=datasources/data-source=MusicDS:test-connection-in-pool
{
"outcome" => "success",
"result" => [true]
}
I do not see any issue with the WildFly 9. Can you please share more details about datasource which you configured ? Please post the XML snippet of your datasource.
Also we see that in your output * {"process-state" => "reload-required"}* Which indicates that you might have made some changes which needs a reload. Did you try reloading ?
Also when you got the following error then did you notice any ERROR in the server.log, Can you please share that log snippet ?
[WFLYJCA0042: failed to match pool. Check JndiName: java:/MusicDS"]
-
2. Re: Can't create MySQL datasource in WildFly 9 CR1
jaysensharma May 9, 2015 1:08 AM (in response to lpeter91)You are right, Then i verified it with the "console" http://localhost:9990/console/App.html#datasources
When we try creating a new DataSource from Console then if fails with the same error:
The reason so far i see is that is is because of incorrectly generated pool setting. Notice <max-pool-size>0</max-pool-size>
<pool>
<min-pool-size>0</min-pool-size>
<initial-pool-size>0</initial-pool-size>
<max-pool-size>0</max-pool-size>
<allow-multiple-users>false</allow-multiple-users>
</pool>
Can you try removing this setting from your DataSource (Not from the console) rather manually by editing the standalone.xml and then test. (this is just a workaround)
max-pool-size is Zero which means it wont allow even a single connection. I reported this issue: https://issues.jboss.org/browse/WFLY-4615
-
3. Re: Can't create MySQL datasource in WildFly 9 CR1
lpeter91 May 9, 2015 4:28 AM (in response to lpeter91)Workaround works. Thanks for the help and creating the report!
-
4. Re: Can't create MySQL datasource in WildFly 9 CR1
mitrandir May 24, 2015 2:17 PM (in response to jaysensharma)Had the same problem but with postgresql.
I couldn't manage to add datasource through gui,
but tryed as you wrote in comand line cli, all worked fine.
I looked settings in GUI console, and settings were the same as i entered first time in GUI..
-
5. Re: Can't create MySQL datasource in WildFly 9 CR1
samalaraj72 Jul 14, 2015 3:59 AM (in response to jaysensharma)Hi Jay,
In Step-2). As i tried to Add data Source with web console,
am unable to detect the Driver
FYI : i have deployed mysql.jar file
i have com.mysql module in modules folders, but still it's unable to detect,
can you try step 2 from web console ?