论坛首页 入门技术论坛

Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/sshnews,

浏览 23706 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2010-01-21   最后修改:2010-01-21

在myeclipse中启动tomcat,提示以下错误:

2009-1-18 3:11:25 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\MyEclipse-6.0M1\bin;D:\Tomcat 6.0\bin
2009-1-18 3:11:26 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-1-18 3:11:26 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 4172 ms
2009-1-18 3:11:27 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-1-18 3:11:27 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.10
2009-1-18 3:11:32 org.apache.tomcat.util.modeler.Registry registerComponent
严重: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/sshnews,J2EEApplication=none,J2EEServer=none
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(WebAnnotationSet.java:145)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:84)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:57)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1064)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4238)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
... 6 more


我在网上搜的解决方案是更换JRE版本。然后我在myeclipse中的project菜单中的property中,更改JDK compliance分别为1.3,1.4,5.0都不行。在myeclipse中的windows菜单中的preference中修改jre为5.0也不行。用myeclipse自带的JRE也不行。

 

最终结果是Tomcat下面设置的JDK和应用程序使用的JDK版本不一致所致!!!

解决办法:
1.打开MyEclipse
2.Window
3.Preferences
4.选择Java节点
5.Installed JREs
6.可以看到当前使用的JVM是什么版本,路径在哪里,现在我们要改正和Tomcat一样的虚拟机.
6.Edit
7.JRE home directory
8.Browse 找到:C:\Sun\SDK\jdk\jre(找到你的安装目录)
9.ok
搞定了.!

分析:
比如,你項目中的是JRE5.0但compile是JRE6.0則出現上述錯誤。或者版本不一致!


 

 

论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics