Bonjour à tous


Depuis peu je bloque sur un petit soucis, si quelqu'un peu me débloqué cela serai sympa

voila le problème, lors du lancement de mon application java (Spring, Hibnerate sous Eclipse et Tomcat 7)

je recois un message d'erreur concernant la sessionFactory, j'ai fait beaucoup de recherche mais en vains

voici le message obtenu

ERROR [Thread-2] ContextLoader.initWebApplicationContext(206) | Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mSessionFactory' defined in class path resource [com/eh/messages/metier/ressources/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:407)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String
at org.hibernate.property.BasicPropertyAccessor.createSetter(BasicPropertyAccessor.java:216)
at org.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:209)
at org.hibernate.mapping.Property.getSetter(Property.java:277)
at org.hibernate.tuple.component.PojoComponentTuplizer.buildSetter(PojoComponentTuplizer.java:137)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:44)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50)
at org.hibernate.mapping.Component.buildType(Component.java:152)
at org.hibernate.mapping.Component.getType(Component.java:145)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:753)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:691)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)

Mon fichier de configuration spring
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
 
<?xml version="1.0" encoding="UTF-8"?>
<beans
	xmlns="http://www.springframework.org/schema/beans" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
	<!-- Hibernate SessionFactory -->
 
	<bean id="mSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="configLocation" value="classpath:/com/eh/messages/metier/ressources/hibernate.cfg.xml"/>
	    <property name="configurationClass">
	    	<value>org.hibernate.cfg.AnnotationConfiguration</value> 
	    </property>
	</bean>
 
	<!-- Hibernate Transaction Manager Definition -->
 	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		 <property name="sessionFactory">
		 	<ref bean="mSessionFactory"/>
		 </property>
	</bean>
 
	 <!-- Transactional proxy Services -->	
	<bean id="transactionProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
		  <property name="transactionManager">
		  	<ref local="transactionManager"/>
		  </property>
		  <property name="proxyTargetClass">
		  	<value>true</value>
		  </property> 
		  <property name="transactionAttributes">
		   <props>
			    <prop key="create*">PROPAGATION_REQUIRED</prop>
			    <prop key="update*">PROPAGATION_REQUIRED</prop>
			    <prop key="save*">PROPAGATION_REQUIRED</prop>
			    <prop key="delete*">PROPAGATION_REQUIRED</prop>
			    <prop key="*">PROPAGATION_REQUIRED</prop>
		   </props>
		  </property>
	</bean>	
 
	<!-- Public Message -->
	<bean id="publicMessageDAO" class="com.eh.messages.metier.dao.ext.impl.PublicMessageDAOImpl">
		  <property  name="sessionFactory">
		  	<ref bean="mSessionFactory" />
		  </property>
	</bean>
	<bean id="publicMessageServiceTarget" class="com.eh.messages.metier.service.ext.impl.PublicMessageServiceImpl">
		  <property name="publicMessageDAO">
		  	<ref bean="publicMessageDAO"/>
		  </property>
	</bean>
    <bean id="publicMessageService" parent="transactionProxy">
       	  <property name="target">
         	<ref bean="publicMessageServiceTarget" />
       	  </property>
    </bean>
</beans>
Merci de votre aide