Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Servlet: java.lang.ClassNotFoundException: org.json.simple.parser.ParseException

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.

Here is the log:

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?

like image 383
Khawar Raza Avatar asked Jul 05 '12 14:07

Khawar Raza


1 Answers

I had the same problem, try adding this library:

http://code.google.com/p/json-simple/downloads/detail?name=json-simple-1.1.1.jar

Tomy

like image 72
gajo Avatar answered Oct 29 '22 23:10

gajo