Bonjour,

Je possède de deux modules Maven, le premier sert à un module (métier) de Repository et de Service permettant d'interroger la base de données via des EJB3, et le deuxième module sert à une application web permettant d'afficher des données.

J'ai testé mes services EJB3 de mon module (métier), ils marchent parfaitement,

J'essaye d'inclure ce module (métier) comme une dépendance dans mon module web app. Et lorsque je déploie ce dernier sur JBOSS, le déploiement échoue et ci-dessous l'erreur :

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
26
27
28
29
30
31
32
33
34
35
 
11:54:37,656 WARN  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (ServerService Thread Pool -- 62) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
11:54:37,671 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.persistenceunit."webappmodule.war#my-jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."webappmodule.war#my-jpa": javax.persistence.PersistenceException: [PersistenceUnit: my-jpa] Unable to build EntityManagerFactory
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_79]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_79]
	at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_79]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: appr-prov-jpa] Unable to build EntityManagerFactory
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:925)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
	... 4 more
Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:98)
	at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:68)
	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:174)
	at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:85)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:184)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:156)
	at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1827)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1785)
	at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
	... 9 more
 
11:54:37,671 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: L'opération ("deploy") a échoué - adresse : ([("deployment" => "webappmodule.war")]) - description de l'échec : {"JBAS014671: Les services ont échoué" => {"jboss.persistenceunit.\"webappmodule.war#my-jpa\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"webappmodule.war#my-jpa\": javax.persistence.PersistenceException: [PersistenceUnit: my-jpa] Unable to build EntityManagerFactory
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: my-jpa] Unable to build EntityManagerFactory
    Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set"}}
11:54:37,749 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS015859: Déploiement de "webappmodule.war" (runtime-name: "webappmodule.war")
11:54:37,749 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Rapport de statut de service
JBAS014777: Services qui n'ont pas pu démarrer :      service jboss.persistenceunit."webappmodule.war#my-jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."webappmodule.war#my-jpa": javax.persistence.PersistenceException: [PersistenceUnit: my-jpa] Unable to build EntityManagerFactory
Merci de vos renseignements