【问题标题】:Error 500: Filter [Spring OpenEntityManagerInViewFilter]: could not be loaded错误 500:过滤器 [Spring OpenEntityManagerInViewFilter]:无法加载
【发布时间】:2009-06-23 16:31:24
【问题描述】:

我正在尝试在 WAS 6.0 (JDK 1.4.2) 上部署 Spring 应用程序。前一天我收到了大量(不支持的major.minor 49.0版)错误。我替换了大部分 jar 文件,现在只剩下一个错误:

org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter(不支持major.minor 49.0版)

为此我需要替换什么 jar 文件?此外,当我在浏览器中运行我的 URL 时,我收到了错误:

错误 500:过滤器 [Spring OpenEntityManagerInViewFilter]:无法加载

你能指导我,我到底在哪里做错了。附上我的 Web.xml。

非常感谢您的帮助。

enter code here

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 分析 Roo 生成的分析应用程序

<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>analytics.root</param-value>
</context-param>

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
</context-param>

<context-param>

log4jConfigLocation 类路径:log4j.properties org.springframework.web.util.Log4jConfigListener org.springframework.web.context.ContextLoaderListener

<servlet>
    <servlet-name>analytics</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>

<!-- Serves static resource content from .jar files such as spring-js.jar -->
<servlet>
    <servlet-name>Resource Servlet</servlet-name>
    <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>analytics</servlet-name>
    <url-pattern>/*.html</url-pattern>
</servlet-mapping>

<!-- Map all /resources requests to the Resource Servlet for handling -->
<servlet-mapping>
    <servlet-name>Resource Servlet</servlet-name>
    <url-pattern>/resources/*</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>httpMethodFilter</filter-name>
    <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>httpMethodFilter</filter-name>
    <servlet-name>analytics</servlet-name>
</filter-mapping>

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

Spring OpenEntityManagerInViewFilter /*

<session-config>
    <session-timeout>10</session-timeout>
</session-config>

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/WEB-INF/jsp/uncaughtException.jsp</location>
</error-page>

【问题讨论】:

    标签: spring spring-mvc


    【解决方案1】:

    “Unsupported major.minor version”错误是由您使用为高于您正在运行的 java 版本编译的 JAR 文件引起的。

    我认为类文件版本 49.0 是 Java 5,而您运行的是 1.4。这意味着您必须使用仅限 Java 5 的库,并且只有 Java 5 的 Spring 的唯一版本是 Spring 3.0。如果是这种情况,请将您的 Spring 降级到 2.5.6。

    【讨论】:

      猜你喜欢
      • 2016-11-19
      • 1970-01-01
      • 2014-05-22
      • 1970-01-01
      • 1970-01-01
      • 2015-12-05
      • 1970-01-01
      • 2014-09-24
      • 1970-01-01
      相关资源
      最近更新 更多