我正在为Android实施Google Cloud
Messaging服务。我创建了一个测试服务器,该服务器将推送通知发送给应用程序用户。但是我创建的服务器正在生成以下错误。我在服务器端使用Java
Servlet,并且在项目中包含了gcm-server.jar文件。
这是日志:
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)
知道这怎么了吗?
我遇到了同样的问题,请尝试添加此库:
http://code.google.com/p/json-simple/downloads/detail?name=json-
simple-1.1.1.jar
汤米