UnavailableException Google App Engine End points project

1 view
Skip to first unread message

TurnipEntropy via StackOverflow

unread,
Jan 23, 2017, 8:14:04 AM1/23/17
to google-appengin...@googlegroups.com

so I apparently did something so heinous that my entire backend API just exploded. Every API call is broken now, and every single one used to work.

Changes I made:

  1. Wanting to use Streams, I had Eclipse make the project 1.8 compatible. I've learned this can't work on App Engine, and we'll get to this later.
  2. I added another property to the POJO of a Datastore Entity.

Attempted Fixes:

  1. After finding out that the entire backend was broken (not all backend calls require that POJO), I eliminated the second change as the cause of the entire break (could be a problem later, but I have bigger problems at the moment).
  2. I changed the Java compiler settings in Eclipse to be 1.7, and I changed the JRE System Library back to JavaSE-1.7. It's still the 1.8 JDK, but I know that's not a problem because I have another app that is running fine with those settings.
  3. I removed all imports of anything Streams related.

I have also commented out the entire backend calls and replaced it with return statements of non-null objects of the call's return type. Still getting the following exception:

Uncaught exception from servlet
javax.servlet.UnavailableException: java.lang.SecurityException: Unable to get members for class com.poke.poketeam.spi.PokeTeamProjectApi
    at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415)
    at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:458)
    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.java:1166)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:37)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:60)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:48)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java: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.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:257)
    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.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:145)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:516)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:276)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:320)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:312)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
    at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:235)
    at java.lang.Thread.run(Thread.java:745)

I understand that this usually has to do with a missing dependency file, but for the life of me I cannot figure out what that might be. I have not included new imports (full list below), and I'm not asking the backend to do anything except return a new object at this point (most of them are ArrayList of POJOs). Any ideas would be greatly appreciated. Thanks.

import list:

import com.poke.poketeam.domain.* // all POJOs
import come.poke.poketeam.services.OfyService;//so it has static registration of POJOs to Datastore
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.PriorityQueue;
import java.util.regex.Pattern;

import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiMethod;
import com.google.api.server.spi.config.ApiMethod.HttpMethod;
import com.google.api.server.spi.config.Named;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.PreparedQuery;
import com.google.appengine.api.datastore.Query;
import com.google.appengine.api.datastore.DatastoreService;
import com.googlecode.objectify.Key;

included jar list:

resources.jar
rt.jar
jsse.jar
jce.jar
charsets.jar
jfr.jar
access-bridge.jar
cldrdata.jar
dnsns.jar
jaccess.jar
jfxrt.jar
localedata.jar
nashorn.jar
sunec.jar
sunjce_provider.jar
sunmscapi.jar
sunpkcs11.jar
zipfs.jar
appengine-api-1.0-sdk-1.9.4.jar
appengine-endpoints-1.9.4.jar
servlet-api-2.5.jar
junit-4.11.jar
hamcrest-core-1.3.jar
mockito-all-1.9.5.jar
appengine-testing-1.9.4.jar
appengine-api-stubs-1.9.4.jar
objectify-5.0.jar
guava14.0.1.jar


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/41807139/unavailableexception-google-app-engine-end-points-project

TurnipEntropy via StackOverflow

unread,
Jan 23, 2017, 9:44:05 AM1/23/17
to google-appengin...@googlegroups.com

OK... so no idea why it worked on one project and not the other. It may have just been that the other project didn't actually update after changing apparently all of my Eclipse projects to using the 1.8 jdk (despite having project specific jres/jdks) after I used Maven to update the server. But changing the jre to 7 did fix the problem.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/41807139/unavailableexception-google-app-engine-end-points-project/41808938#41808938

TurnipEntropy via StackOverflow

unread,
Jan 28, 2017, 5:56:05 PM1/28/17
to google-appengin...@googlegroups.com

So the app that I said worked with Java 1.8 running under 1.7SE actually just probably didn't update, and would have stopped working had I pushed it to update harder.

If you are receiving this error, it is a dependency problem. In my case, it was the dependency on, well, all of Java. App Engine doesn't work with 1.8 at all.

If you had wanted to use Streams, and let Eclipse hook you up, here's how you change it:

  1. In the project explorer side bar, open up Java Resources and then Libraries
  2. Right click on JRE System Library and hit properties
  3. Change the Execution Environment to be JRE 7 (or 1.7, whichever way you have it saved), NOT 1.8 JRE 1.7. There are multiple options for the 1.8 jdk, and all of them are wrong. Have to get 1.7.
Reply all
Reply to author
Forward
0 new messages