SSH整合异常总结

 

org.springframework.beans.factory.BeanCreationException

你现在的问题有两种可能,一种是没有加asm包,其中有antlr-2.7.6 asm asm-attrs三个包还有一种可能,是你的Spring中的cglib-nodep-2.x.x包与Hibernate中的cglib-2.2包相冲突,删除cglib-2.2就行了

 

-<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> +<filter> -<filter> <filter-name>sesion</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> -<filter> <filter-name>character</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> -<init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> -<filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> -<filter-mapping> <filter-name>sesion</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> -<filter-mapping> <filter-name>character</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> -<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>

 

 

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>classpath*:applicationContext-*.xml</param-value>
  </context-param>
   <!-- 编码过滤 -->  
  <filter>
  <filter-name>encodingFilter</filter-name>
  <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
  </filter>
   <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping> 
  <!-- Hibernate Session -->
   <filter>
    <filter-name>hibernateFilter</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>hibernateFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping> 
  <!-- 启动Spring -->   
  <listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
   <!-- 防止内存泄露 -->
  <listener>
  <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
  </listener>

 

 

 

你可能感兴趣的:(spring,Hibernate,session,ssh,filter)