Google CCS Server implementation

208 views
Skip to first unread message

amits

unread,
Aug 13, 2013, 2:58:18 PM8/13/13
to andro...@googlegroups.com
I took the first shot at implementing the new GCM CCS server on Google App Engine using the Smack library for XMPP. 

https://developer.android.com/google/gcm/ccs.html

However, I get below exceptions and could not find a way to resolve it. I do have smack.jar in WEB-INF/lib directory. Has anyone else tried it out and know how to resolve this?

[s~mighty-app/0-58.369479717923256319].<stderr>: Error! A startup class specified in smack-config.xml could not be loaded: org.jivesoftware.smackx.LastActivityManager
[s~mighty-app/0-58.369479717923256319].<stderr>: Error! A startup class specified in smack-config.xml could not be loaded: org.jivesoftware.smackx.commands.AdHocCommandManager
Error for /client
java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details.
	at com.google.appengine.runtime.Request.process-0046d50b9de5cb22(Request.java)
	at javax.naming.InitialContext.<clinit>(InitialContext.java)
	at org.jivesoftware.smack.util.dns.JavaxResolver.<clinit>(JavaxResolver.java:45)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:111)
	at org.jivesoftware.smack.SmackConfiguration.parseClassToLoad(SmackConfiguration.java:335)
	at org.jivesoftware.smack.SmackConfiguration.<clinit>(SmackConfiguration.java:95)
	at org.jivesoftware.smack.Connection.<clinit>(Connection.java:125)
	at org.jivesoftware.smack.ConnectionConfiguration.<init>(ConnectionConfiguration.java:78)
	at com.xmpp.test.GcmXmppSender.connect(GcmXmppSender.java:243)
...

Costin Manolache

unread,
Aug 13, 2013, 4:30:03 PM8/13/13
to andro...@googlegroups.com
I don't think Smack works on appengine - it may try to remove the Adhoc command manager, or change the implementation to not use JNDI - but you'll still need to be able to open a socket, and I don't think that's enabled.


Costin




--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/73cd848d-f984-4668-ae84-6e5130a97a2a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

amits

unread,
Aug 13, 2013, 5:47:07 PM8/13/13
to andro...@googlegroups.com
Thanks Costin. There is a way to open a socket from GAE using open socket API - https://developers.google.com/appengine/docs/python/sockets/overview

Is there a sample/library which implements CCS server using GAE (& open socket API)?

AsafK

unread,
Aug 14, 2013, 7:14:52 AM8/14/13
to andro...@googlegroups.com
Im having the same issue. For the first errors regarding smackx classes i also copied smakx.jar to WEB-INF/lib. but i still have NoClassDefFoundError because of GAE sandbox restrictions.
Appreciate if someone could help here.

Devwrat Lad

unread,
Apr 15, 2014, 2:23:34 AM4/15/14
to andro...@googlegroups.com
still App engine doesn't support java smack library ?
Reply all
Reply to author
Forward
0 new messages