Hi All
I am just learning about spring + hibernate on normal application (Swing) everything run smoothly until lazyloading problem
here is the error
3703 [main] ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: com.jimmy.quoteonline.pojo.Division.categories - no session or session was closed
now i have trying to change my applicationContext.xml
now like this
<bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.Hibernat eInterceptor">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="maintenanceServiceTarget" class="com.acompany.MaintenanceServiceImpl">
<property name="categoryDao"><ref bean="categoryDao" /></property>
<property name="divisionDao"><ref bean="divisionDao" /></property>
</bean>
<bean id="maintenanceService" class="org.springframework.aop.framework.ProxyFact oryBean">
<property name="target">
<ref bean="maintenanceServiceTarget" />
</property>
<property name="proxyInterfaces">
<value>com.acompany.MaintenanceService</value>
</property>
<property name="interceptorNames">
<list>
<value>hibernateInterceptor</value>
</list>
</property>
</bean>
is anyone can please please help me?
Spring + Hibernate should be extremely easy but with this lazy it is throwing more trouble that it should be
please help
many thanks in advance



Reply With Quote