tomcat5.0.27+jdk1.4+jsf 出现java.lang.UnsupportedClassVersionError_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > tomcat5.0.27+jdk1.4+jsf 出现java.lang.UnsupportedClassVersionError

tomcat5.0.27+jdk1.4+jsf 出现java.lang.UnsupportedClassVersionError

 2010/9/19 22:57:35  dreamstar1020  http://javazheng.javaeye.com  我要评论(0)
  • 摘要:Tomcat5.0.27+jdk1.4+jsf2010-09-1921:03:28StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:init():ruleChain:[org.apache.webapp.balancer.RuleChain:[org.apache.webapp.balancer.rules.URLStringMatchRule:Targetstring:News/RedirectURL
  • 标签:tomcat5.0.27jdk1.4jsf 出现java.lang.UnsupportedClassVersionError
Tomcat5.0.27+jdk1.4+jsf

2010-09-19 21:03:28
StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2010-09-19 21:03:29 StandardContext[/MetisDev]Error configuring application listener of class process.listener.ApplicationInitListener
java.lang.UnsupportedClassVersionError: process/listener/ApplicationInitListener (Unsupported major.minor version 49.0)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3775)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
	at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

2010-09-19 21:03:29 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2010-09-19 21:03:29 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2010-09-19 21:03:29 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2010-09-19 21:03:29 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2010-09-19 21:04:58 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2010-09-19 21:04:59 StandardContext[/MetisDev]Error configuring application listener of class process.listener.ApplicationInitListener
java.lang.UnsupportedClassVersionError: process/listener/ApplicationInitListener (Unsupported major.minor version 49.0)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3775)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
	at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

2010-09-19 21:04:59 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2010-09-19 21:04:59 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2010-09-19 21:05:00 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2010-09-19 21:05:00 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2010-09-19 21:08:31 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2010-09-19 21:08:44 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2010-09-19 21:08:44 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2010-09-19 21:08:44 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2010-09-19 21:08:44 StandardContext[/jsp-examples]SessionListener: contextInitialized()



1.出现java.lang.UnsupportedClassVersionError 错误的原因,是因为我们使用高版本的JDK编译的Java class文件试图在较低版本的JVM上运行,所报的错误。因为,高版本的JDK生成的class文件使用的格式,可能与低版本的JDK的.class文件格式不同。这样,低版本的JVM无法解释执行这个.class文件,会抛java.lang.UnsupportedClassVersionError不支持的Class版本错误。
2.解决方案:
在MyEclipse----应用服务器下,指定Tomcat5。指定Tomcat使用jdk1.4。
进入myeclipse首选项---Java---编译器,可以看到,默认的编译器依从等级是5.0,这里改为1.4,因为我们使用的软件需要运行在JDK1.4的JVM上。即可解决问题。
发表评论
用户名: 匿名