首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

myeclipse5.0+eclpise3.2_tomcat5.0+jdk1.4解决方案

2012-01-16 
myeclipse5.0+eclpise3.2_tomcat5.0+jdk1.4建立一个简单的sturts项目。启动时tomcat报错2007-1-521:22:37or

myeclipse5.0+eclpise3.2_tomcat5.0+jdk1.4
建立一个简单的sturts项目。
启动时tomcat报错
2007-1-5   21:22:37   org.apache.commons.digester.Digester   startElement
严重:   Begin   event   threw   exception
java.lang.reflect.InvocationTargetException
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke
Caused   by:   java.lang.UnsupportedClassVersionError:   com/yourcompany/struts/form/HelloForm   (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.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.java:320)
at   org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
...   54   more
2007-1-5   21:22:37   org.apache.struts.action.ActionServlet   handleConfigException
严重:   Parsing   error   processing   resource   path  
java.lang.reflect.InvocationTargetException
at   org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at   org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at   org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at   org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown   Source)
at   org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown   Source)
at   org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown   Source)
at   org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.commons.digester.Digester.parse(Digester.java:1548)
at   org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at   org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at   org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at   javax.servlet.GenericServlet.init(GenericServlet.java:211)
at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at   org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at   org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at   org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
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.install(StandardHostDeployer.java:277)
at   org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at   org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at   org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at   org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
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:287)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)




[解决办法]
UnsupportedClassVersionError: com/yourcompany/struts/form/HelloForm
版本不支持嘛!
[解决办法]
可能是没有配置好!

[解决办法]
版本是不是一致,这个很关键
[解决办法]
楼主在Eclipse编译的.class文件不对,肯定是用JDK1.5编译的,到Eclipse下找到工程,察看工程属性中的Java编译器,看看是不是默认5.0编译的
[解决办法]
换JDK 5.0

热点排行