Objectify compatibility?

201 views
Skip to first unread message

stephanos

unread,
Feb 10, 2014, 9:23:23 AM2/10/14
to appscale_...@googlegroups.com
Hey everyone,

we are just trying to run our Java application on AppScale and get this error on startup:

Feb 10, 2014 2:17:00 PM com.googlecode.objectify.cache.TriggerSuccessFuture trigger
WARNING: Future<?> threw an exception during trigger
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at com.google.appengine.api.utils.FutureWrapper.setExceptionResult(FutureWrapper.java:63)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:94)
at com.googlecode.objectify.cache.TriggerFuture.get(TriggerFuture.java:102)
at com.googlecode.objectify.impl.ResultAdapter.now(ResultAdapter.java:34)
at com.googlecode.objectify.impl.Round$2.now(Round.java:135)
at com.googlecode.objectify.impl.Round$2.now(Round.java:132)
at com.googlecode.objectify.impl.LoadEngine$1.nowUncached(LoadEngine.java:172)
at com.googlecode.objectify.impl.LoadEngine$1.nowUncached(LoadEngine.java:164)
at com.googlecode.objectify.util.ResultCache.now(ResultCache.java:30)
at com.googlecode.objectify.impl.Round$1.nowUncached(Round.java:73)
at com.googlecode.objectify.util.ResultCache.now(ResultCache.java:30)
at com.googlecode.objectify.LoadResult.now(LoadResult.java:25)

Do you have any hints as to what might lead to this?
(It works fine locally and on App Engine.)

Regards
Stephan

stephanos

unread,
Feb 10, 2014, 9:35:36 AM2/10/14
to appscale_...@googlegroups.com
oh, there's another one:

WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@69513ba9{/,/var/apps/my-app/app/war}
java.lang.NullPointerException
at com.google.storage.onestore.v3.OnestoreEntity$CompositeIndex.setAppId(OnestoreEntity.java:11505)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.setupIndexes(Unknown Source)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.init(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl.startServices(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl.access$000(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$1.run(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.ApiProxyLocalImpl.getService(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(Unknown Source)
at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:493)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:490)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

By the way, the app is deployed in App Engine with SDK 1.8.9.

Navraj Chohan

unread,
Feb 10, 2014, 12:02:21 PM2/10/14
to appscale_...@googlegroups.com
Hi Stephan,
Did you compile your app with the 1.8.0 GAE SDK? The tools will complain to you if the version is wrong. That is generally the reason for the null pointer exceptions you're seeing.

Thanks,
Raj


--
You received this message because you are subscribed to the Google Groups "AppScale Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appscale_commun...@googlegroups.com.
To post to this group, send email to appscale_...@googlegroups.com.
Visit this group at http://groups.google.com/group/appscale_community.
For more options, visit https://groups.google.com/groups/opt_out.



--
Navraj Chohan (Raj), PhD
Co-Founder of AppScale Systems
A Google Cloud Partner 

and a GigaOm Structure/LaunchPad "Best of the Best" Startups


615 State Street

Santa Barbara, CA 93101

stephanos

unread,
Feb 10, 2014, 3:40:31 PM2/10/14
to appscale_...@googlegroups.com
Hm, I just tried the 1.8.0 SDK. Same result.
There was no complaining about a wrong version, at least I didn't see one.
To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsub...@googlegroups.com.

To post to this group, send email to appscale_...@googlegroups.com.
Visit this group at http://groups.google.com/group/appscale_community.
For more options, visit https://groups.google.com/groups/opt_out.

Navraj Chohan

unread,
Feb 10, 2014, 4:31:23 PM2/10/14
to appscale_...@googlegroups.com
Hi Stephan
Can you send me a small app to reproduce the issue?

Thanks,
Raj


To unsubscribe from this group and stop receiving emails from it, send an email to appscale_commun...@googlegroups.com.

To post to this group, send email to appscale_...@googlegroups.com.
Visit this group at http://groups.google.com/group/appscale_community.
For more options, visit https://groups.google.com/groups/opt_out.

Glenn Molnar

unread,
Nov 12, 2014, 12:08:42 AM11/12/14
to appscale_...@googlegroups.com
Hi Stephan,

Did you have any luck with this? I am getting the same stack trace.

INFO: Successfully processed /var/apps/ppq-uat/app/ppq-1.0-SNAPSHOT/WEB-INF/datastore-indexes.xml
Nov 12, 2014 5:03:38 AM com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: javax.servlet.ServletContext log: unavailable
java.lang.NullPointerException
at com.google.storage.onestore.v3.OnestoreEntity$CompositeIndex.setAppId(OnestoreEntity.java:11505)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.setupIndexes(Unknown Source)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.init(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl.startServices(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl.access$000(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$1.run(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.ApiProxyLocalImpl.getService(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(Unknown Source)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(Unknown Source)
at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:493)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:490)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

It would appear to be caused by something in my datastore-indexes.xml but I'm having trouble narrowing down what exactly.

Thanks
Glenn

stephanos

unread,
Nov 12, 2014, 4:03:40 AM11/12/14
to appscale_...@googlegroups.com
Sorry, we didn't investigate further and abandoned the whole thing.

Navraj Chohan

unread,
Nov 12, 2014, 11:59:39 AM11/12/14
to appscale_...@googlegroups.com
Hi Glenn,
These sorts of errors/exceptions generally happen when you have conflicting jars. Remove the appengine jars before uploading the app and you should see these weird errors go away.

AppScale will copy over the following jars (so make sure you're not uploading conflicting ones with your app):
appengine-api-1.0-sdk-1.8.0.jar
appengine-remote-api.jar  
appscale-smtp.jar
appengine-api-labs-1.8.0.jar    
appscale-activation.jar  
jsr107cache-1.1.jar
appengine-jsr107cache-1.8.0.jar  
appscale-mail.jar

You would find the application jars for a maven built project named guestbook here:
/var/apps/appscaleperformance/app/guestbook-1.0-SNAPSHOT/WEB-INF/lib#

In the future we'll see about automatically removing conflicting jars.
Thanks,
Raj

--
You received this message because you are subscribed to the Google Groups "AppScale Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appscale_commun...@googlegroups.com.
To post to this group, send email to appscale_...@googlegroups.com.
Visit this group at http://groups.google.com/group/appscale_community.
For more options, visit https://groups.google.com/d/optout.



--
Navraj Chohan (Raj), PhD
Co-Founder of AppScale Systems
A Google Cloud Partner,
Gartner 2014 Cool Vendor, 

Navraj Chohan

unread,
Nov 12, 2014, 12:02:30 PM11/12/14
to appscale_...@googlegroups.com
Sorry, that path should have been:

/var/apps/guestbook/app/guestbook-1.0-SNAPSHOT/WEB-INF/lib#

Navraj Chohan

unread,
Nov 12, 2014, 4:20:33 PM11/12/14
to appscale_...@googlegroups.com
I have a fix for removing conflicting jars here:

Thanks,
Raj

graziano obertelli

unread,
Nov 16, 2014, 6:36:20 PM11/16/14
to appscale_...@googlegroups.com
Hi Stephanos,

sorry to hear that. As Raj mentioned we did figure out some of the weird
errors reported to us: in case you want to give it another shot, let me
know and I will be happy to walk through.

cheers,
graziano
> --
> You received this message because you are subscribed to the Google
> Groups "AppScale Community" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to appscale_commun...@googlegroups.com.
> To post to this group, send email to
> appscale_...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appscale_community.
> For more options, visit https://groups.google.com/d/optout.

--
graziano obertelli <graz...@appscale.com>
AppScale Systems Inc.

Henry Tong

unread,
Dec 16, 2014, 1:13:15 AM12/16/14
to appscale_...@googlegroups.com
Hi everyone,

We were getting a similar error as above after we have deployed our app:

WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@5fcd4f5d{/,/var/apps/myTestApp/app}
java.lang.NullPointerException
        at com.google.storage.onestore.v3.OnestoreEntity$CompositeIndex.setAppId(OnestoreEntity.java:11505)

We have done the following but still get the same error:
1. Compiled our code with 1.8.0 GAE SDK
2. Removed the conflicting jars as mentioned above
3. We are using the latest AppScale release 2.1.0 (looks like the fix mentioned above was in the release as well)

Is there anything else that we can do to get the app working?

Thanks a lot.
Henry

Henry

unread,
Jan 8, 2015, 9:24:51 PM1/8/15
to appscale_...@googlegroups.com

Hi everyone,

Just an update on our status. We have been able to get another App of ours to run on AppScale. 
We will continue to test and will report any new problem if we cannot resolve ourselves.

Thanks for the AppScale team's help!

Best regards,
Henry

graziano obertelli

unread,
Jan 10, 2015, 7:24:18 PM1/10/15
to appscale_...@googlegroups.com
Hello Henry,

thanks for the feedback and glad to hear all is well now!

cheers,
graziano
> --
> You received this message because you are subscribed to the Google
> Groups "AppScale Community" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to appscale_commun...@googlegroups.com.
> To post to this group, send email to
> appscale_...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appscale_community.
> For more options, visit https://groups.google.com/d/optout.

--
Graziano Obertelli
AppScale Systems, Inc.


Sam Martens

unread,
Jul 26, 2017, 6:19:07 AM7/26/17
to AppScale Community
Hi, 

I cannot get my app to be working:

If I keep the appengine-api-1.0-sdk-1.8.4.jar I get the following error:
SEVERE: javax.servlet.ServletContext log: unavailable
java.lang.NullPointerException
at com.google.storage.onestore.v3.OnestoreEntity$CompositeIndex.setAppId(OnestoreEntity.java:11876)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.setupIndexes(Unknown Source)
at com.google.appengine.api.datastore.dev.LocalDatastoreService.init(Unknown Source)
            If I remove the the appengine-api-1.0-sdk-1.8.4.jar I get the following error:

            java.lang.NoClassDefFoundError: com/google/appengine/api/memcache/ErrorHandler

            I was using GAE version 1.9.53 but changed my version to 1.8.4

            PS: what do you mean with compiling the code with version 1.8.4? I use maven to build my application. I just changed the dependency on the appengine-api-1.0-sdk to 1.8.4. But when I build my app it will retrieve the latest SDK being 1.9.54.

            Any help would be great

            Chris Donati

            unread,
            Jul 27, 2017, 10:40:35 PM7/27/17
            to appscale_...@googlegroups.com
            Looking at your first stacktrace, it appears that the application ID was not retrieved properly when the AppServer started. Is `application` defined in your appengine-web.xml?

            Maven should include the appengine-api-1.0-sdk-1.8.4.jar when you specify that version for the appengine-api-1.0-sdk dependency. Is it possible you have another dependency that's pulling in the 1.9.53 jar as well?

            --
            You received this message because you are subscribed to the Google Groups "AppScale Community" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsub...@googlegroups.com.
            To post to this group, send email to appscale_community@googlegroups.com.
            Visit this group at https://groups.google.com/group/appscale_community.

            Sam Martens

            unread,
            Jul 28, 2017, 7:19:53 AM7/28/17
            to AppScale Community
            Hi Chris, 

            My appengine-web.xml is very simple:

            <?xml version="1.0" encoding="utf-8"?>
            <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
              <application>jamo-dev</application>
              <version>1</version>
              <threadsafe>true</threadsafe>
              <static-files>
                <include path="**.js" expiration="10m" />
              </static-files>
              <system-properties>
                <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
                <property name="file.encoding" value="UTF-8" />
                <property name="DEFAULT_ENCODING" value="UTF-8" />
              </system-properties>
              <sessions-enabled>true</sessions-enabled>
               
              <manual-scaling>
            <instances>1</instances>
              </manual-scaling>
            </appengine-web-app>


            I compile my code using maven where I have the following dependency:

            <dependency>
                        <groupId>com.google.appengine</groupId>
                        <artifactId>appengine-api-1.0-sdk</artifactId>
                        <version>1.8.4</version>
            </dependency>
            ....
                    
            For some reason it always adds the latest version of the appengine-api-1.0-sdk (not even 1.9.53 that I had, but 1.9.54)

            I then replaced this 1.9.54 with 1.8.4 and create a tar using tar --exclude='jamoAutomation.tar.gz' -czvf jamoAutomation.tar.gz * in the war folder.

            That is what I then uploaded with the exceptions mentioned above. I also tried with removing the sdk, since I expected it to be provided within Appscale, but then I get NoClassDefFoundError.

            I am running in the standard environment (NOT flexible).


            Op vrijdag 28 juli 2017 04:40:35 UTC+2 schreef Chris Donati:
            To post to this group, send email to appscale_...@googlegroups.com.

            Chris Donati

            unread,
            Aug 7, 2017, 1:17:24 PM8/7/17
            to appscale_...@googlegroups.com
            I haven't been able to reproduce the problem you are seeing on master. I would be happy to debug a sample app archive if you have one available that reproduces the problem (the NullPointerException during SetupIndexes). Just let me know what version of AppScale you are using.

            Hi Chris, 

            To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsubscribe@googlegroups.com.
            To post to this group, send email to appscale_...@googlegroups.com.
            Visit this group at https://groups.google.com/group/appscale_community.
            For more options, visit https://groups.google.com/d/optout.

            --
            You received this message because you are subscribed to the Google Groups "AppScale Community" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsub...@googlegroups.com.
            To post to this group, send email to appscale_community@googlegroups.com.

            Arka Bandyopadhyay

            unread,
            Aug 29, 2017, 8:37:29 AM8/29/17
            to AppScale Community

            I have not used maven still getting the same error.
            Hi Chris, 

            To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsub...@googlegroups.com.
            To post to this group, send email to appscale_...@googlegroups.com.
            Visit this group at https://groups.google.com/group/appscale_community.
            For more options, visit https://groups.google.com/d/optout.

            --
            You received this message because you are subscribed to the Google Groups "AppScale Community" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to appscale_community+unsub...@googlegroups.com.

            chris....@appscale.com

            unread,
            Sep 8, 2017, 1:59:37 PM9/8/17
            to AppScale Community
            The NullPointerException was occurring because the datastore client was trying to check a property that had not been set yet. https://github.com/AppScale/appscale/pull/2547 should fix the issue.
            Reply all
            Reply to author
            Forward
            0 new messages