Hello,
I was trying to implement the XMPP application server as described at the link - https://developer.android.com/google/gcm/ccs.html#implement
I have done some minor changes and I created the endpoint for the "connect" method of the class.I have deployed this on google app engine.
However when I call the connect from the android client from mobile device I get following exception -
java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory
at org.jivesoftware.smack.SmackConfiguration.processConfigFile(SmackConfiguration. java:390)
at org.jivesoftware.smack.SmackConfiguration.processConfigFile(SmackConfiguration. java:385)
at org.jivesoftware.smack.SmackConfiguration.<clinit>(SmackConfiguration.java:161)
at org.jivesoftware.smack.ConnectionConfiguration.<init>(ConnectionConfiguration.j ava:69)
at com.example.mymodule.XMPPServer.SmackCcsClientEndpoint.connect(SmackCcsClientEn dpoint.java:263)
at com.example.mymodule.XMPPServer.SmackCcsClientEndpoint.getInstance(SmackCcsClie ntEndpoint.java:69)
at com.example.mymodule.connectionServlet.CcsServlet.init(CcsServlet.java:24)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1166)
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.ja va:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(Response RewriterFilter.java:127)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(Header VerificationFilter.java:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter .java:63)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Transacti onCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilt er.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectReques t(DevAppServerModulesFilter.java:366)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModule Request(DevAppServerModulesFilter.java:349)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAp pServerModulesFilter.java:116)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppE ngineWebAppContext.java:98)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.ha ndle(JettyContainerService.java:490)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938 )
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(Isolate dAppClassLoader.java:216)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 44 more
I have downloaded "Smack 4.0.4" from Downloads section and added file dependency to my backend module.
I have tried changing to different version of smack but error persists.
What could be the cause of the error? Why cant it fine the XMLPullParser?
Please help me fix this problem.
Thanks in advance
Regards,
Shailesh