-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: mappingJarLocations
PostPosted: Mon Jun 16, 2008 8:43 am 
Newbie

Joined: Sat May 07, 2005 4:36 pm
Posts: 2
J'utilise Spring 2.0.7 avec Hibernate 3.2.2 dans un projet pour lequel le code métier est packagé en plusieurs Jar.

Dans mon projet Web (projet principal), je dois référencer les fichiers de mapping des Jar.

Je configure ma SessionFactory avec Spring et j'utilise le code suivant :
Code:
<bean id="sessionFactory"       class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
...
<property name="mappingJarLocations">
<list>
<value>file://C:/dev/repository/fr/sedit/core/BLCoreServer/1.0/BLCoreServer-1.0.jar </value>
<value>file://C:/dev/repository/jboss/jbpm/3.1.4/jbpm-3.1.4.jar</value>
</list>
</property>
...
</bean>


Mes tests unitaires utilisant cette configuration me retourne l'erreur suivante :

Code:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [fr/sedit/grh/spring/ApplicationContext-Database.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/jcr/RepositoryException
Caused by: java.lang.NoClassDefFoundError: javax/jcr/RepositoryException
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
   at java.lang.Class.getDeclaredMethods(Class.java:1791)
   at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317)
   at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297)
   at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280)
   at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
   at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:80)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:71)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
   at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2164)
   at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2141)
   at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2031)
   at org.hibernate.cfg.HbmBinder.bindSubclass(HbmBinder.java:823)
   at org.hibernate.cfg.HbmBinder.handleSubclass(HbmBinder.java:2210)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:149)
   at org.hibernate.cfg.Configuration.add(Configuration.java:669)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:504)
   at org.hibernate.cfg.Configuration.addJar(Configuration.java:618)


Quelqu'un peut-il me donner le mode d'utilisation de la propriétée mappingJarLocations avec les différents pièges à éviter (format de l'url, etc.) ?

Merci d'avance.


Top
 Profile  
 
 Post subject: identification du problème
PostPosted: Mon Jun 16, 2008 9:06 am 
Newbie

Joined: Sat May 07, 2005 4:36 pm
Posts: 2
L'origine du problème se situe sur l'ajout de la librairie jbpm :

Code:
<property name="mappingJarLocations">
<list>
<value>file://C:/dev/repository/fr/sedit/core/BLCoreServer/1.0/BLCoreServer-1.0.jar </value>
value>file://C:/dev/repository/jboss/jbpm/3.1.4/jbpm-3.1.4.jar</value> </list>
</property>

Le premier ajout fonctionne correctement.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.