Hi!
I have a problem with my database connection.
My <project-name>-dev-ds.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>simple_videoDatasource</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/seam</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>seam</user-name>
<password>seam</password>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
I get this output in the log file:
19:51:57,312 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.mysql.jdbc.Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver))
I tried three different versions of mysql-connector-java-bin.jar, the jar is located in the /lib directory and is added to the .classpath in the correct way.
I have the same problem when using the Oracle driver so it is probably not the driver class itself.
Any hint?
Thanks!
Haefti