Y a t-il un problème pour utiliser hibernate dans un web service? En effet j'utilise l'outil JBossWS pour générer mon web service dont voici le code:
et quand je lance mon client, voici l'erreur qu'il génère:
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 public class DmexWs implements IDmexWs { SessionFactory sessionFactory = new Configuration().configure ().buildSessionFactory(); public String getDmex(int id) throws RemoteException { CommonManager cm = HibernateEnviron.getCommonManager(); Dmex dmex = (Dmex)cm.findOneId(Dmex.class, id); return dmex.getDescription(); } }
pourtant, j'ai bien ajouter ma librairie mysql au classpath et ce code marche bien quand je l'utilise sans passer par un web service
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 java.rmi.RemoteException: Call invocation failed with code [Client] because of: JDBC Driver class no t found: com.mysql.jdbc.Driver; nested exception is:
Partager