spring中延迟关闭Session我在web.xml配置了
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- 加载Struts2控制器 -->
FilterDispatcher
org.apache.struts2.dispatcher.FilterDispatcher
<filter-mapping>
<filter-name>FilterDispatcher</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 将Hibernate的Session生命延长,为了解决由于Hibernate延迟加载,Session过早关闭问题 -->
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<!-- 加载Spring容器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
index.jsp
然后 tomcat服务器就启动报错报下面的错
严重: Exception starting filter OpenSessionInViewFilter
java.lang.NoSuchFieldError: MANUAL
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.(OpenSessionInViewFilter.java:102)
望各位大哥大姐帮忙