Hi<br><br>I am quite new to JBoss and I am struggling to get a MySQL Datasource working. <br><br>I am writing a Seam application but the problem seems to be a JBoss problem and I have tried for several hours to get it woking... I really don't understand what is wrong and I don't know if JMX allows to test the database connection either...<br>
<br><br>I have copied mysql-connector-java-5.1.7-bin.jar to server/default/lib and my datasource is defined as followed:<br>(the driver works when I connect to the database from Eclipse...)<br><br><font face="courier new,monospace"><?xml version="1.0" encoding="UTF-8"?><br>
<br><!DOCTYPE datasources<br> PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"<br> "<a href="http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd</a>"><br>
<br><datasources><br> <br> <local-tx-datasource><br> <jndi-name>MyDatabaseDatasource</jndi-name><br> <connection-url>jbdc:mysql://localhost:3306/mydatabase</connection-url><br>
<driver-class>com.mysql.jdbc.Driver</driver-class><br> <user-name>xxx</user-name><br> <password>xxx</password><br> <br> <exception-sorter-class-name><br> org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter<br>
</exception-sorter-class-name><br> <metadata><br> <type-mapping>mySQL</type-mapping><br> </metadata><br><br> </local-tx-datasource><br> <br></datasources><br>
</font><br><br>Here is the exception I get...<br><br><br><br><span style="font-family: courier new,monospace;">16:59:10,223 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Wrong driver class for this connection URL)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ....</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">16:59:10,231 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">16:59:10,231 ERROR [JDBCExceptionReporter] Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Wrong driver class for this connection URL); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Wrong driver class for this connection URL))</span><br>
<br>Many thanks for your help<br><br>Oscar<br>