I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file
我正试图开始开发Java和Stripes框架。我的网站上有以下内容。xml文件
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" 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"
>
<filter>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>
pdapm.action
</param-value>
</init-param>
<init-param>
<param-name>Extension.Packages</param-name>
<param-value>
pdapm.extensions, org.stripesbook.reload.extensions
</param-value>
</init-param>
</filter>
<filter>
<filter-name>DynamicMappingFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>DynamicMappingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
I am receiving the error:
我收到错误信息:
The requested resource ... is not available.
Is there anything I need to add or anything I should try to fix associated with tomcat. I used the tomcat addon to xampp. I am a beginner so it may have been a simple mistake or skipped step. I'm just looking for a nudge in the right direction.
是否有什么需要添加的东西,或者应该尝试修复与tomcat相关的东西。我使用了tomcat addon到xampp。我是一个初学者,所以这可能是一个简单的错误或跳过的步骤。我只是想找个正确的方向。
[21:44:14] WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class
'pdapm/action/BaseActionBean.class' due to a java.lang.UnsupportedClassVersionError
with message: Bad version number in .class file (unable to load class
pdapm.action.BaseActionBean)
[21:44:14] WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class
'pdapm/action/HomeActionBean.class' due to a java.lang.UnsupportedClassVersionError
with message: Bad version number in .class file (unable to load class
pdapm.action.HomeActionBean)
2 个解决方案
#1
6
The error means your stripes library is compiled with a newer Java than the Tomcat's JVM. Java is not forward-compatible. Say your Tomcat runs under Java 5. It can't load classes compiled with Java 6.
这个错误意味着您的stripes库是用比Tomcat的JVM更新的Java编译的。Java不是向后兼容性。假设Tomcat在Java 5下运行。它不能加载使用Java 6编译的类。
Upgrade the JRE on your system.
升级系统上的JRE。
#2
0
I'm not sure but I think ZZ Coder could be right did you check what complier compliance level your project is targeted at and if it's set to 1.6 (Java 6); set it to 1.5 (or whatever Java version your Server is running in) -rebuild and deploy and see what happens.
我不确定,但是我认为ZZ程序员可能是对的你是否检查过你的项目目标是什么编译器遵从性水平,如果它被设置为1.6 (Java 6);将其设置为1.5(或您的服务器正在运行的任何Java版本)-重新构建和部署,看看会发生什么。
#1
6
The error means your stripes library is compiled with a newer Java than the Tomcat's JVM. Java is not forward-compatible. Say your Tomcat runs under Java 5. It can't load classes compiled with Java 6.
这个错误意味着您的stripes库是用比Tomcat的JVM更新的Java编译的。Java不是向后兼容性。假设Tomcat在Java 5下运行。它不能加载使用Java 6编译的类。
Upgrade the JRE on your system.
升级系统上的JRE。
#2
0
I'm not sure but I think ZZ Coder could be right did you check what complier compliance level your project is targeted at and if it's set to 1.6 (Java 6); set it to 1.5 (or whatever Java version your Server is running in) -rebuild and deploy and see what happens.
我不确定,但是我认为ZZ程序员可能是对的你是否检查过你的项目目标是什么编译器遵从性水平,如果它被设置为1.6 (Java 6);将其设置为1.5(或您的服务器正在运行的任何Java版本)-重新构建和部署,看看会发生什么。