首页 新闻 会员 周边 捐助

comet4j错误,500错误,json转换异常

0
悬赏园豆:20 [待解决问题]

小弟才疏学浅,看的demo,照写的,不知道这个错误该咋解决,求各位大大的帮助,感谢、、、

 

 

 

浏览器错误如下:

JSON转换异常:html><head><title>Apache Tomcat/6.0.41 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Error allocating a servlet instance</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Error allocating a servlet instance</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Error allocating a servlet instance org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:891) org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:750) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2283) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:744) </pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError: org/apache/catalina/comet/CometProcessor java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:800) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:891) org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:750) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2283) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:744) </pre></p><p><b>root cause</b> <pre>java.lang.ClassNotFoundException: org.apache.catalina.comet.CometProcessor org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:800) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:891) org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:750) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2283) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:744) </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.41 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.41</h3></body></html
 
 
 
myeclipse控制台错误:
 

十二月 15, 2014 11:13:24 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet CometServlet
java.lang.ClassNotFoundException: org.apache.catalina.comet.CometProcessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:891)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:750)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2283)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

magic-xie的主页 magic-xie | 初学一级 | 园豆:182
提问于:2014-12-15 23:22
< >
分享
所有回答(1)
0

java.lang.ClassNotFoundException: org.apache.catalina.comet.CometProcessor

找不到这个类呀,这个类是tomcat的catalina.jar包中的,是由catalinaLoader来加载的。

你的异常却是用WebappClassLoader来加载,是加载不到的。

你可以看看http://blog.china.com.cn/home.php?mod=space&uid=1235982&do=blog&id=237159 这个文章说了WebappClassLoader加载的jar的位置

乐享程序员 | 园豆:930 (小虾三级) | 2014-12-16 12:48
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册