LazyInitializationException OpenSessionInViewFilter

Commonly used J2EE server side frameworks.

LazyInitializationException OpenSessionInViewFilter

Postby haretu » Wed Jul 27, 2011 2:33 pm

if used OpenSessionInViewFilter in web.xml, still has LazyInitializationException.
need fix like the following, move the following the block to the top of web.xml. before struts2 dispatcher filter

<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
</filter-class>
</filter>

<filter-mapping>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to struts,spring,hibernate

Who is online

Users browsing this forum: No registered users and 0 guests

cron