Bonjour,
Je bloque depuis un moment sur ce probléme sans avancer d'un pouce :
- je suis dans une configuration GlassFish Tools Bundle For Eclipse (eclipse + glassfish)/JPA/Hibernate/PostgreSQL.
- j'ai créé un dynamic web project sous eclipse
- j'ai mes classe annotées, les libs (HibernateTools + driver postgre) attachées à mon projet et mon fichier persistence.xml que j'ai placé manuellement dans un répertoire META-INF, dans src, le tout faisant parti du "build path".
Malgré tout ça, si j'essaie d'accéder à ma page une fois le serveur lancé, je prends ce message :
javax.persistence.PersistenceException: No Persistence provider for EntityManager named jpa
Je mets ici mon fichier de persistence au cas où l'erreur viendrait de là :
Code XML : 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
36
37
38
39
40
41
42 <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" 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"> <persistence-unit name="jpa" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class> Chrono</class> <class> Program</class> <class> Application</class> <!-- Classes persistantes --> <properties> <property name="hibernate.archive.autodetection" value="class, hbm" /> <!-- logs SQL <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="use_sql_comments" value="true"/> --> <!-- connexion JDBC --> <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/> <property name="hibernate.connection.url" value="jdbc:postgresql://*****:5432/datafrig2008_test"/> <property name="hibernate.connection.username" value="datafrig2008"/> <property name="hibernate.connection.password" value="******"/> <!-- création automatique du schéma <property name="hibernate.hbm2ddl.auto" value="create" /> --> <!-- Dialecte --> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <!-- propriétés DataSource c3p0 --> <property name="hibernate.c3p0.min_size" value="5" /> <property name="hibernate.c3p0.max_size" value="20" /> <property name="hibernate.c3p0.timeout" value="300" /> <property name="hibernate.c3p0.max_statements" value="50" /> <property name="hibernate.c3p0.idle_test_period" value="3000" /> </properties> </persistence-unit> </persistence>
Si quelqu'un a une piste de recherche ...
Merci d'avance,
Julien




Répondre avec citation



C'est pas vraiment les logs que j'attendais m'enfin.

Partager