Hi

I have a nullPointerException when I try to insert data in my
production site.
It works with the local server. I have tried with the sample code of
the documentation but the error is the same.
I am using the version 1.5.0.1 of the java sdk

Sample code
public class RemoteApiExample {
    public static void main(String[] args) throws IOException {
        String username = System.console().readLine("username: ");
        String password =
            new String(System.console().readPassword("password: "));
        RemoteApiOptions options = new RemoteApiOptions()
            .server("<your app>.appspot.com", 443)
            .credentials(username, password);
        RemoteApiInstaller installer = new RemoteApiInstaller();
        installer.install(options);
        try {
            DatastoreService ds =
DatastoreServiceFactory.getDatastoreService();
            System.out.println("Key of new entity is " +
                ds.put(new Entity("Hello Remote API!")));
        } finally {
            installer.uninstall();
        }
    }
}


Exception in thread "main" java.lang.NullPointerException
        at
com.google.appengine.tools.remoteapi.ClientLogin.getClientLoginToken(ClientLogin.java:
72)
        at
com.google.appengine.tools.remoteapi.ClientLogin.login(ClientLogin.java:
36)
        at
com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java:
195)
        at
com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java:
165)
        at
com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java:
86)
        at
unittest.com.website.tools.RemoteApiExample.main(RemoteApiExample.java:
18)

Thanks

PA

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to