Bonjour,
J'ai un souci de configuration de JPA via Spring, voila mon fichier applicationContext.xml :
Voici mon fichier persistence.xml :
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 <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="mobistatwebDS"/> <property name="persistenceUnitName" value="msw_base" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true" /> <property name="generateDdl" value="true" /> <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" /> </bean> </property> </bean> <bean id="mybaseDS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/my_base?zeroDateTimeBehavior=convertToNull" /> <property name="username" value="myLoginRoot"/> <property name="password" value="myPassRoot"/> </bean> <bean class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager" p:entityManagerFactory-ref="entityManagerFactory"> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /> </property> </bean> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> <bean id="genericFacade" class="fr.msw.ejb3.session.bean.GenericFacadeBean" />
Et voici la trace d'erreur complète :
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<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="msw_base" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/mybaseDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="hibernate.hbm2ddl.auto" value="validate" /> </properties> </persistence-unit> <persistence-unit name="my_base_admin" transaction-type="JTA"> <jta-data-source>java:/mobistatadminDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> <property name="hibernate.hbm2ddl.auto" value="create-validate" /> </properties> </persistence-unit> </persistence>
Quelqu'un peut me dire ce qui manque ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory''entityManagerFactory'"load()"








Répondre avec citation
Partager