OK I tried this<br><a href="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/Using_other_Databases.html#creating_a_jdbc_client">http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/Using_other_Databases.html#creating_a_jdbc_client</a><br>
<br>and it worked...<br><br>So it means that either my DS file is wrong or that it is a Seam problem.<br><br>Thanks anyway<br><br>Oscar<br><br><div class="gmail_quote">On Sat, Apr 18, 2009 at 5:15 PM, Oscar Ostlund <span dir="ltr">&lt;<a href="mailto:oscar.ostlund@gmail.com">oscar.ostlund@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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&#39;t understand what is wrong and I don&#39;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">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>

<br>&lt;!DOCTYPE datasources<br>    PUBLIC &quot;-//JBoss//DTD JBOSS JCA Config 1.5//EN&quot;<br>    &quot;<a href="http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd" target="_blank">http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd</a>&quot;&gt;<br>

    <br>&lt;datasources&gt;<br>   <br>   &lt;local-tx-datasource&gt;<br>      &lt;jndi-name&gt;MyDatabaseDatasource&lt;/jndi-name&gt;<br>      &lt;connection-url&gt;jbdc:mysql://localhost:3306/mydatabase&lt;/connection-url&gt;<br>

      &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;<br>      &lt;user-name&gt;xxx&lt;/user-name&gt;<br>      &lt;password&gt;xxx&lt;/password&gt;<br> <br>      &lt;exception-sorter-class-name&gt;<br>         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter<br>

      &lt;/exception-sorter-class-name&gt;<br>      &lt;metadata&gt;<br>         &lt;type-mapping&gt;mySQL&lt;/type-mapping&gt;<br>      &lt;/metadata&gt;<br><br>   &lt;/local-tx-datasource&gt;<br>    <br>&lt;/datasources&gt;<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><font color="#888888"><br>Oscar<br>
</font></blockquote></div><br>