我正在尝试在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>

有帮助吗?

解决方案

“不支持的major.minor版本”使用为更高版本的java编译而不是运行的JAR文件导致错误。

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top