Error in PostPut callbacks

56 views
Skip to first unread message

Arun Nedun

unread,
Jan 23, 2015, 9:32:28 PM1/23/15
to google-a...@googlegroups.com
**Need Help

Need the correct syntax and usage for postput callbacks to track entity updates and do post execution. I followed the example but getting null exception error. 


java.lang.NoSuchMethodError: com.google.appengine.api.datastore.Key.<init>(Ljava/lang/String;Lcom/google/appengine/api/datastore/Key;JLjava/lang/String;Lcom/google/appengine/api/datastore/AppIdNamespace;)V
	at com.google.appengine.api.datastore.KeyTranslator.createFromPb(KeyTranslator.java:38)

Also I'm using android studio. Not sure what else i need to set to compile and make it work. 

Servlet code

public class PostMsgServlet {

    static Logger logger = Logger.getLogger("logger");

    @PostPut(kinds = {"Credentials"})
    void log(PutContext context) {
        logger.fine("Inside put. Finished putting " + context.getCurrentElement().getKey());


    }

}

Vinny P

unread,
Jan 27, 2015, 2:12:10 AM1/27/15
to google-a...@googlegroups.com
On Fri, Jan 23, 2015 at 8:32 PM, Arun Nedun <ar...@routestar.in> wrote:
Need the correct syntax and usage for postput callbacks to track entity updates and do post execution. I followed the example but getting null exception error. 
java.lang.NoSuchMethodError


Are you using Objectify 4? If so, can you try upgrading to Objectify 5+ and see if the error repeats itself?

If the error still continues, can you post the entire exception and stack trace?
 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
  

Jeff Schnitzer

unread,
Jan 27, 2015, 9:51:42 AM1/27/15
to Google App Engine
It doesn't look like there's any Objectify code here, and Objectify doesn't use the callbacks anyways.

My guess is multiple GAE SDKs on the classpath somehow.

Jeff

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CALSvALBLs2U7JvT7-Mm9OsHSkmm9Py-zeZ8pr9ERFoYYBb%3D1KQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages