问题描述
我实现谷歌云消息传递服务机器人。我创建它发送推送通知的应用程序的用户测试服务器。不过,我已经创建了服务器产生下面的错误。我使用的Java Servlet在服务器端,并已列入项目GCM-的server.jar文件。
I am implementing Google Cloud Messaging service for android. I have created a test server which sends push notifications to application users. But the server I have created is generating following error. I am using Java Servlet at server side and have included gcm-server.jar file in project.
下面是日志:
java.lang.ClassNotFoundException: org.json.simple.parser.ParseException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at com.mgcm.SendGCMMessage.processRequest(SendGCMMessage.java:48)
at com.mgcm.SendGCMMessage.doPost(SendGCMMessage.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
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:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
任何想法有什么不对的?
Any idea what's wrong with this?
推荐答案
我有同样的问题,尝试添加该库:
I had the same problem, try adding this library:
<一个href="http://$c$c.google.com/p/json-simple/downloads/detail?name=json-simple-1.1.1.jar">http://$c$c.google.com/p/json-simple/downloads/detail?name=json-simple-1.1.1.jar
和Tomy
这篇关于Servlet的:抛出java.lang.ClassNotFoundException:org.json.simple.parser.ParseException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!