当前位置: 代码迷 >> Eclipse >> java.lang.UnsupportedClassVersionError: Bad version number in .class file (
  详细解决方案

java.lang.UnsupportedClassVersionError: Bad version number in .class file (

热度:565   发布时间:2016-04-23 14:07:43.0
编译时出现严重错误
2011-8-31 1:10:44 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin
2011-8-31 1:10:44 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-8-31 1:10:44 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1234 ms
2011-8-31 1:10:45 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-8-31 1:10:45 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.33
2011-8-31 1:10:45 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2011-8-31 1:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
2011-8-31 1:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping
2011-8-31 1:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
2011-8-31 1:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
2011-8-31 1:10:49 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.bjsxt.bbs2009.action.CategoryAction)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1964)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:138)
at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:96)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:398)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:355)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3666)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
  相关解决方案