Erreur "A JDBC Driver or DataSource class name must be specified"
Bonjour,
J'essaye d'utiliser OpenJPA avec TomEE (Tomcat) et une base MySQL 5.
Voici une partie de la stacktrace:
Citation:
INFO: Starting OpenJPA 2.2.0
26 janv. 2013 17:42:39 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [dispatcher] in context with path [/Exercice] threw exception [Request processing failed; nested exception is <openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. Available properties in configuration are "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@fdaf18ee".] with root cause
<openjpa-2.2.0-r422266:1244990 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. Available properties in configuration are "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@fdaf18ee".
at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:72)
Et voici mon fichier persistence.xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="databasedb">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<class>com.database.jpa.Agent</class>
<properties>
<property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost:3306/databaseDB"/>
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
<property name="openjpa.ConnectionUserName" value="root"/>
<property name="openjpa.ConnectionPassword" value="ibm2database"/>
<property name="openjpa.ConnectionFactoryProperties"
value="PrettyPrint=true, PrettyPrintLineLength=80"/>
<property name="openjpa.Log" value="DefaultLevel=TRACE"/>
</properties>
</persistence-unit>
</persistence> |
Quelqu'un saurait-il m'indiquer d'où vient le problème ?
Merci d'avance pour votre aide.