Bonjour,
j'ai un projet qui marche bien avec hibernate3, une BD postgres. Cependant j'ai une base postgis2.0 et quand je veux remplir cette base à partir de l'application j'ai besoin d'intégrer hibernate spatiale :
       - j'ai téléchargé hibernate-spatial-postgis-1.1 et l'ai mise dans le lib du projet, après je l'ai ajouté par le build path add jars.
       - j'ai ajouté de la même façon jts-1.13 et le driver pour postgis
       - j'ai changé dans le hibernate.cfg.xml la balise dilect et j'ai mis :
	
	org.hibernatespatial.postgis.PostgisDialect
        quand je run un test qui marchait avant d'ajouter hibernate spatiale, j'ai l'erreur suivante :
	
	| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 
 | Exception in thread "main" java.lang.ExceptionInInitializerError
	at ehtp.intranet.jpadao.generiqueJpadao.impl.GeneriqueImpl.ajouter(GeneriqueImpl.java:24)
	at ehtp.intranet.jpadao.Main.main(Main.java:33)
Caused by: java.lang.RuntimeException: Problème de configuration : Dialect class not found: org.hibernatespatial.postgis.PostgisDialect.class
	at ehtp.intranet.jpadao.commune.ConnexionHibernat.<clinit>(ConnexionHibernat.java:23)
	... 2 more
Caused by: org.hibernate.HibernateException: Dialect class not found: org.hibernatespatial.postgis.PostgisDialect
	at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:104)
	at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:65)
	at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:460)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:155)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at ehtp.intranet.jpadao.commune.ConnexionHibernat.<clinit>(ConnexionHibernat.java:21)
	... 2 more | 
 quand je cherche je ne trouve que de s configuration avec maven 
merci pour votre aide.
						
					
Partager