Bonjour,
Je développe actuellement une application utilisant un web service qui utilise hibernate pour cherche un objet dans ma base de données mysql en lui passant l'id en paramètre (à priori rien de complqué)
Mon webservice tourne sur un serveur JBoss 4.0
Mais quand je lance mon client pour invoquer mon webservice, j'ai l'erreur suivante:
Y-a-t-il un problème pour utiliser hibernate depuis un webservice
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 12:13:54,327 FATAL [C3P0ConnectionProvider] JDBC Driver class not found: com.mysql.jdbc.Driver java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212) at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method)
Pour info, voici mon fichier hibernate.cfg.xml utilisé par mon webservice
Ce fichier vient d'un configuration faite sur une application tournant sur un serveur Apache Tomcat 5.0, peut être la configuration est-elle différente pour un serveur JBoss 4.0
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.c3p0.autoReconnect">false</property> <property name="hibernate.c3p0.autoReconnectForPool">false</property> <property name="hibernate.c3p0.max_size">100</property> <property name="hibernate.c3p0.max_statements">50</property> <property name="hibernate.c3p0.min_size">2</property> <property name="hibernate.c3p0.timeout">120</property> <property name="hibernate.connection.autocommit">true</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.release_mode">auto</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password"></property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/dmexmanageratlas</property> <!-- <property name="hibernate.connection.username">dmex_data</property> <property name="hibernate.connection.password">dmex</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3319/dmexmanageratlastest</property>--> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.show_sql">true</property> <property name="hibernate.transaction.auto_close_session">false</property> <property name="hibernate.use_sql_comments">true</property>
Quelqu'un a-t-il une idée?
Partager