I am using google-endpoint V2 on app engine standard, with firebase authentication.
When deploying locally, the server starts and runs fine. When a query is issued to access one of the endpointV2, I get an inconsistent behavior:
it works well for a bit (the endpoint returns with the expected payload), but sometimes gets stuck trying to contact https://servicecontrol.googleapis.com/v1/services/my-project-id.appspot.com:check.
It takes about a minute to timeout, then the next query may timeout or return properly...
Any idea of how to resolve that would be appreciated!
The logs in the devserver, for a failed query:
[INFO] GCLOUD: failed because of java.net.SocketTimeoutException: Timeout while fetching: https://servicecontrol.googleapis.com/v1/services/my-project-id.appspot.com:check
[INFO] GCLOUD: Aug 02, 2017 12:27:06 AM com.google.api.control.Client check
[INFO] GCLOUD: SEVERE: direct send of a check request service_name: "my-project-id.appspot.com"
[INFO] GCLOUD: operation {
[INFO] GCLOUD: operation_id: "7453fb02-56e3-48ec-856c-e25d09ccc792"
[INFO] GCLOUD: operation_name: "1.recipes_groceries_appspot_com.ApiadminPop"
[INFO] GCLOUD: consumer_id: "project:my-project-id"
[INFO] GCLOUD: start_time {
[INFO] GCLOUD: seconds: 1501658786
[INFO] GCLOUD: nanos: 76000000
[INFO] GCLOUD: }
[INFO] GCLOUD: end_time {
[INFO] GCLOUD: seconds: 1501658786
[INFO] GCLOUD: nanos: 76000000
[INFO] GCLOUD: }
[INFO] GCLOUD: labels {
[INFO] GCLOUD: key: "servicecontrol.googleapis.com/referer"
[INFO] GCLOUD: value: "http://localhost:4200/_ah/api/static/proxy.html?jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.4KxLsUEUJCA.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCOh765ksalVtUgJb_uys4PUTu6HZA"
[INFO] GCLOUD: }
[INFO] GCLOUD: labels {
[INFO] GCLOUD: key: "servicecontrol.googleapis.com/caller_ip"
[INFO] GCLOUD: value: "127.0.0.1"
[INFO] GCLOUD: }
[INFO] GCLOUD: labels {
[INFO] GCLOUD: key: "servicecontrol.googleapis.com/user_agent"
[INFO] GCLOUD: value: "ESP"
[INFO] GCLOUD: }
[INFO] GCLOUD: labels {
[INFO] GCLOUD: key: "servicecontrol.googleapis.com/service_agent"
[INFO] GCLOUD: value: "EF_JAVA/1.0.4"
[INFO] GCLOUD: }
[INFO] GCLOUD: }
[INFO] GCLOUD: failed because of java.net.SocketTimeoutException: Timeout while fetching: https://servicecontrol.googleapis.com/v1/services/my-project-id.appspot.com:check
[INFO] GCLOUD: Aug 02, 2017 12:27:06 AM com.google.api.control.ControlFilter doFilter
[INFO] GCLOUD: WARNING: the check did not succeed; the response null
[INFO] GCLOUD: Aug 02, 2017 12:27:06 AM com.google.api.server.spi.auth.GoogleAppEngineAuthenticator authenticate
[INFO] GCLOUD: INFO: appEngineUser = example#example.com
Related
I am getting an error while deploying my project to appengine.
When I run this app locally, its running fine but when I try to deploy this to appengine I am getting the below error. Can someone help here?
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [9]
[INFO] GCLOUD: Application startup error:
[INFO] GCLOUD: Start command: java -showversion -
agentpath:/opt/cdbg/cdbg_java_agent.so=--log_dir=/var/log/app_engine,--
alsologtostderr=true -Xms2048M -Xmx2048M -XX:+UseG1GC -
XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -jar app.jar
[INFO] GCLOUD: -XX:InitialHeapSize=514850816 -XX:MaxHeapSize=514850816 -
XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -
XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
[INFO] GCLOUD: I0707 20:55:24.233410 25 jvmti_globals.cc:352] Build time:
Jun 22 2017 16:09:00
[INFO] GCLOUD: I0707 20:55:24.239876 25 jvmti_agent.cc:158] Java debuglet
initialization started
[INFO] GCLOUD: I0707 20:55:24.240190 25 jvmti_agent.cc:192] Java debuglet
initialization completed
[INFO] GCLOUD: I0707 20:55:24.356501 25 jvmti_agent.cc:203] Java VM
started
[INFO] GCLOUD: I0707 20:55:24.369704 25 jvmti_agent.cc:213]
JvmtiAgent::JvmtiOnVMInit initialization time: 13205 microseconds
[INFO] GCLOUD: I0707 20:55:24.370100 36 jvmti_agent_thread.cc:99] Agent
thread started: CloudDebugger_main_worker_thread
[INFO] GCLOUD: I0707 20:55:24.370481 36 jvm_internals.cc:376] Loading
internals from /opt/cdbg/cdbg_java_agent_internals.jar
[INFO] GCLOUD: openjdk version "1.8.0_131"
[INFO] GCLOUD: OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-
1~bpo8+1-b11)
[INFO] GCLOUD: OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
[INFO] GCLOUD:
[INFO] GCLOUD: no main manifest attribute, in app.jar
[INFO] GCLOUD: I0707 20:55:24.495450 25 jvmti_agent.cc:221] Java VM
termination
[INFO] GCLOUD: I0707 20:55:24.781633 36 jni_logger.cc:31] Initializing
ClassPathLookup, default classpath: true, extra classpath: [], config: null
[INFO] GCLOUD: I0707 20:55:24.814752 36 jni_logger.cc:31] Total size of
indexed resources database: 846 bytes
[INFO] GCLOUD: I0707 20:55:24.825848 36 jvm_internals.cc:132]
ClassPathLookup constructor time: 48169 microseconds
[INFO] GCLOUD: I0707 20:55:24.826359 36
yaml_data_visibility_config_reader.cc:33] debugger-config.yaml was not
found. Using default settings.
[INFO] GCLOUD: E0707 20:55:24.826520 36 jni_bridge.cc:44] Bind not
allowed after Shutdown
[INFO] GCLOUD: E0707 20:55:24.826850 36 worker.cc:145] HubClient not
available: debugger thread can't continue.
[INFO] GCLOUD: I0707 20:55:24.826905 36 jvmti_agent_thread.cc:103] Agent
thread exited: CloudDebugger_main_worker_thread
[INFO] GCLOUD: I0707 20:55:24.827049 25 worker.cc:116] Debugger threads
terminated
[INFO] GCLOUD: I0707 20:55:24.827231 25 jvmti_agent.cc:235]
JvmtiAgent::JvmtiOnVMDeath cleanup time: 331800 microseconds
[INFO] GCLOUD:
[INFO] ---------------------------------------------------------------------
---
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------------
---
[INFO] Total time: 02:45 min
[INFO] Finished at: 2017-07-07T16:55:37-04:00
[INFO] Final Memory: 26M/524M
[INFO] ---------------------------------------------------------------------
---
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-
plugin:1.3.1:deploy (default-cli) on project SXXRXXXXDataFlowTransform:
Execution default-cli of goal com.google.cloud.tools:appengine-maven-
plugin:1.3.1:deploy failed: Non zero exit: 1 -> [Help 1]
I am using mvn appengine:deploy command on sdk terminal to deploy.
My project is a spring boot project.
I am currently developping a small web application with spring boot. I would like to use google oauth2 to login my user. All worked like a charm in localhost on my computer but when I deploy my app in GAE I get an error.
Here is the error stack I got from dev server on GAE. I guess the error is the same in production mode.
[INFO] 2017-08-27 17:02:31.290 DEBUG 630 --- [tp1134612201-18] g.c.AuthorizationCodeAccessTokenProvider : Retrieving token from https://www.googleapis.com/oauth2/v4/token
[INFO] 2017-08-27 17:02:31.565 DEBUG 630 --- [tp1134612201-18] o.s.web.client.RestTemplate : Created POST request for "https://www.googleapis.com/oauth2/v4/token"
[INFO] 2017-08-27 17:02:31.566 DEBUG 630 --- [tp1134612201-18] g.c.AuthorizationCodeAccessTokenProvider : Encoding and sending form: {grant_type=[authorization_code], code=[4/PmvPPmFGQF0PamafaItFDiqKT_RwZN4RkdoydpxOTD4], redirect_uri=[https://127.0.0.1:8080/login], client_id=[XXX], client_secret=[YYY]}
[INFO] 2017-08-27 17:02:32.905 DEBUG 630 --- [tp1134612201-18] o.s.web.client.RestTemplate : POST request for "https://www.googleapis.com/oauth2/v4/token" resulted in 400 (OK); invoking error handler
[INFO] 2017-08-27 17:02:33.343 DEBUG 630 --- [tp1134612201-18] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'delegatingApplicationListener'
[INFO] 2017-08-27 17:02:33.381 DEBUG 630 --- [tp1134612201-18] uth2ClientAuthenticationProcessingFilter : Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Could not obtain access token
[INFO]
[INFO] org.springframework.security.authentication.BadCredentialsException: Could not obtain access token
[INFO] at org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.attemptAuthentication(OAuth2ClientAuthenticationProcessingFilter.java:107)
[INFO] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
[INFO] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
[INFO] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
[INFO] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
[INFO] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:60)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115)
[INFO] at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59)
[INFO] at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90)
[INFO] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[INFO] at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
[INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[INFO] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
[INFO] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
[INFO] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
[INFO] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
[INFO] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[INFO] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
[INFO] at com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext.doScope(DevAppEngineWebAppContext.java:94)
[INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] at com.google.appengine.tools.development.jetty9.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:597)
[INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] at org.eclipse.jetty.server.Server.handle(Server.java:534)
[INFO] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
[INFO] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
[INFO] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
[INFO] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
[INFO] at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
[INFO] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
[INFO] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
[INFO] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
[INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] at java.lang.Thread.run(Thread.java:748)
[INFO] Caused by: org.springframework.security.oauth2.client.resource.OAuth2AccessDeniedException: Access token denied.
[INFO] at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:142)
[INFO] at org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeAccessTokenProvider.obtainAccessToken(AuthorizationCodeAccessTokenProvider.java:209)
[INFO] at org.springframework.security.oauth2.client.OAuth2RestTemplate.acquireAccessToken(OAuth2RestTemplate.java:221)
[INFO] at org.springframework.security.oauth2.client.OAuth2RestTemplate.getAccessToken(OAuth2RestTemplate.java:173)
[INFO] at org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter.attemptAuthentication(OAuth2ClientAuthenticationProcessingFilter.java:105)
[INFO] ... 65 common frames omitted
[INFO] Caused by: org.springframework.security.oauth2.common.exceptions.RedirectMismatchException: Bad Request
[INFO] at org.springframework.security.oauth2.common.exceptions.OAuth2ExceptionJackson2Deserializer.deserialize(OAuth2ExceptionJackson2Deserializer.java:103)
[INFO] at org.springframework.security.oauth2.common.exceptions.OAuth2ExceptionJackson2Deserializer.deserialize(OAuth2ExceptionJackson2Deserializer.java:33)
[INFO] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
[INFO] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2922)
[INFO] at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:237)
[INFO] at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readInternal(AbstractJackson2HttpMessageConverter.java:217)
[INFO] at org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:193)
[INFO] at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport$AccessTokenErrorHandler.handleError(OAuth2AccessTokenSupport.java:235)
[INFO] at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
[INFO] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
[INFO] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621)
[INFO] at org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport.retrieveToken(OAuth2AccessTokenSupport.java:137)
[INFO] ... 69 common frames omitted
Here is my configuration :
application.yml :
security:
oauth2:
client:
clientId: XXXXX
clientSecret: XXXXX
accessTokenUri: https://www.googleapis.com/oauth2/v4/token
userAuthorizationUri: https://accounts.google.com/o/oauth2/v2/auth
clientAuthenticationScheme: form
scope:
- openid
- email
- profile
resource:
userInfoUri: https://www.googleapis.com/oauth2/v3/userinfo
preferTokenInfo: true
Spring Security configuration :
#Configuration
#EnableOAuth2Sso
#EnableWebSecurity
class WebSecurityConfig : WebSecurityConfigurerAdapter() {
#Throws(Exception::class)
override fun configure(http: HttpSecurity) {
http
.authorizeRequests()
.antMatchers("/", "/home", "/webjars/**", "/count", "/login")
.permitAll()
.anyRequest()
.authenticated()
.and()
.formLogin()
.loginPage("/login")
.permitAll()
.and()
.logout()
.logoutUrl("/logout")
.logoutSuccessUrl("/")
.permitAll()
}
}
MVC controller :
#Configuration
class MvcConfiguration : WebMvcConfigurerAdapter() {
override fun addViewControllers(registry: ViewControllerRegistry?) {
super.addViewControllers(registry)
registry?.addViewController("/home")?.setViewName("home");
registry?.addViewController("/")?.setViewName("home");
registry?.addViewController("/hello")?.setViewName("hello");
}
}
The redirection page I set in my google api console is : https://my-awesome-app.appspot.com/login. All worked when I was testing on http://localhost:8080. There is maybe something with ssl ?
By the way, I am using kotlin. But it is very similar to Java
Can anyone help me ?
It's hard to find the right answer as the full stack trace is not printed out.
Looking at the stack trace, a few key errors state:
[INFO] org.springframework.security.authentication.BadCredentialsException: Could not obtain access token
...
[INFO] Caused by: org.springframework.security.oauth2.client.resource.OAuth2AccessDeniedException: Access token denied.
This indicates that the OAuth Client for your application is not properly authenticated or that the credentials you are using are not valid.
Rather than setting your own Access Token and User Auth URIs, I recommend using the Google Java API Client which will handle this for you:
https://github.com/googleapis/google-api-java-client
We have some G Suite samples that show OAuth flows here:
https://github.com/gsuitedevs/java-samples
Perhaps this answer may be useful too:
Get user info via Google API
I'm trying asynchronous processing support in servlet 3.1 with GAE J8 standard environment (no extensible environment).
Basically I have a servlet annotated with
#WebServlet(name = "MyServletName", urlPatterns = {"/dosomething"}, asyncSupported = true)
and to obtain an instance of AsyncContext I call (in doPost method)
final AsyncContext asyncContext = httpServletRequest.startAsync(httpServletRequest, httpServletResponse);
But asynchronous processing support seems to have some problems in GAE
Local development server says:
[INFO] GCLOUD: java.lang.IllegalStateException: !asyncSupported: _ah_DevAppServerModulesFilter
[INFO] GCLOUD: at org.eclipse.jetty.server.Request.startAsync(Request.java:2262)
[INFO] GCLOUD: at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:464)
[INFO] GCLOUD: at <my-servlet>.doPost
[INFO] GCLOUD: at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
[INFO] GCLOUD: at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772)
[INFO] GCLOUD: at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:134)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:48)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.StaticFileFilter.doFilter(StaticFileFilter.java:122)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
[INFO] GCLOUD: at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[INFO] GCLOUD: at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
[INFO] GCLOUD: at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
[INFO] GCLOUD: at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
[INFO] GCLOUD: at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext.doScope(DevAppEngineWebAppContext.java:94)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: at com.google.appengine.tools.development.jetty9.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:597)
[INFO] GCLOUD: at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: at org.eclipse.jetty.server.Server.handle(Server.java:534)
[INFO] GCLOUD: at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
[INFO] GCLOUD: at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
[INFO] GCLOUD: at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
[INFO] GCLOUD: at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
[INFO] GCLOUD: at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: at java.lang.Thread.run(Thread.java:745)
Once the app is deployed to cloud, the error is:
java.lang.IllegalStateException: !asyncSupported: unknown
at org.eclipse.jetty.server.Request.startAsync (Request.java:2262)
at <my-servlet>.doPost
at javax.servlet.http.HttpServlet.service (HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service (HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:848)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1772)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter (ParseBlobUploadFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1759)
at com.google.apphosting.runtime.jetty9.SaveSessionFilter.doFilter (SaveSessionFilter.java:37)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1759)
at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter (JdbcMySqlConnectionCleanupFilter.java:60)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1759)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1759)
at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:524)
at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:512)
at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:297)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle (Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:320)
at com.google.apphosting.runtime.jetty9.RpcConnection.handle (RpcConnection.java:219)
at com.google.apphosting.runtime.jetty9.RpcConnector.serviceRequest (RpcConnector.java:81)
at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:108)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest (JavaRuntime.java:657)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest (JavaRuntime.java:619)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run (JavaRuntime.java:589)
at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run (JavaRuntime.java:783)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run (ThreadGroupPool.java:263)
at java.lang.Thread.run (Thread.java:745)
Have I missed something?
Thank you!
According to https://cloud.google.com/appengine/docs/standard/java/release-notes#june_28_2017, async servlet 3.1 is not supported.
I created a feature request on Google's public issue tracker, hope the App Engine team can implement this.
I am currently playing with kotlin, Spring social and Google app engine. I am trying to get back a number of followers every second.
Here is my code :
#Service
class SubscribeService {
var subscriber : Disposable? = null
var twitter : Twitter = TwitterTemplate(
"XXXAUTHXXX",
"XXXAUTHXXX",
"XXXAUTHXXX",
"XXXAUTHXXX")
fun subscribe() {
subscriber = Observable.interval(1, TimeUnit.SECONDS).subscribe {println(twitter.userOperations().getUserProfile("azeaze").followersCount)}
}
fun unsubscribe() {
subscriber?.dispose()
}
}
I get this exception when I execute subscribe function :
[INFO] io.reactivex.exceptions.OnErrorNotImplementedException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
[INFO] at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
[INFO] at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:74)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:64)
[INFO] at io.reactivex.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:83)
[INFO] at io.reactivex.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:39)
[INFO] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[INFO] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[INFO] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] at java.lang.Thread.run(Thread.java:748)
[INFO] Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
[INFO] at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844)
[INFO] at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:116)
[INFO] at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:40)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:543)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:422)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:275)
[INFO] at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:84)
[INFO] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
[INFO] at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:99)
[INFO] at org.springframework.social.oauth1.OAuth1RequestInterceptor.intercept(OAuth1RequestInterceptor.java:48)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:86)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:70)
[INFO] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
[INFO] at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
[INFO] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:652)
[INFO] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628)
[INFO] at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:303)
[INFO] at org.springframework.social.twitter.api.impl.UserTemplate.getUserProfile(UserTemplate.java:60)
[INFO] at tbetous.SubscribeService$test$1.accept(SubscribeService.kt:20)
[INFO] at tbetous.SubscribeService$test$1.accept(SubscribeService.kt:11)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:60)
[INFO] ... 9 more
[INFO] Exception in thread "RxComputationThreadPool-1" io.reactivex.exceptions.OnErrorNotImplementedException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
[INFO] at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
[INFO] at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:74)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:64)
[INFO] at io.reactivex.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:83)
[INFO] at io.reactivex.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:39)
[INFO] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[INFO] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[INFO] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] at java.lang.Thread.run(Thread.java:748)
[INFO] Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
[INFO] at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844)
[INFO] at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:116)
[INFO] at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:40)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:543)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:422)
[INFO] at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:275)
[INFO] at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:84)
[INFO] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
[INFO] at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:99)
[INFO] at org.springframework.social.oauth1.OAuth1RequestInterceptor.intercept(OAuth1RequestInterceptor.java:48)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:86)
[INFO] at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:70)
[INFO] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
[INFO] at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
[INFO] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:652)
[INFO] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628)
[INFO] at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:303)
[INFO] at org.springframework.social.twitter.api.impl.UserTemplate.getUserProfile(UserTemplate.java:60)
[INFO] at tbetous.SubscribeService$test$1.accept(SubscribeService.kt:20)
[INFO] at tbetous.SubscribeService$test$1.accept(SubscribeService.kt:11)
[INFO] at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:60)
[INFO] ... 9 more
I am pretty sure it is something about google app engine. When I run my application I use mvn appengine:devserver. Can anyone help me ?
I found my solution. Thanks to this link. GAE does not work with RxJava beacause It does not respect thred restriction of Google standard environnent. I had to specify how RxJava have to create thread.
Here is my code :
val scheduler : Scheduler = Schedulers.from(ScheduledThreadPoolExecutor(3, ThreadManager.backgroundThreadFactory()))
RxJavaPlugins.setComputationSchedulerHandler { scheduler }
After that I can use RxJava :
subscriber = Observable.interval(1, TimeUnit.SECONDS)
.map { twitter.userOperations().getUserProfile("azeazeaz").followersCount }
.subscribe {it -> println(it)}
When attempting to upload a file to a Google App Engine Application running in the Java 8/Jetty 9 Compatible Managed VM environment, I get the following stack trace because the org.eclipse.jetty.util.MultiPartInputStreamParser$MultiPart class does NOT implement the java.io.Serializable interface.
I get the following exception:
[INFO] java.io.NotSerializableException: org.eclipse.jetty.util.MultiPartInputStreamParser$MultiPart
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
[INFO] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
[INFO] at java.util.HashMap.writeObject(HashMap.java:1354)
[INFO] at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333)
[INFO] at java.util.HashMap.writeObject(HashMap.java:1354)
[INFO] at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
[INFO] at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:441)
[INFO] at java.util.Collections$SynchronizedMap.writeObject(Collections.java:2691)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at java.util.HashMap.internalWriteEntries(HashMap.java:1777)
[INFO] at java.util.HashMap.writeObject(HashMap.java:1354)
[INFO] at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
[INFO] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
[INFO] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
[INFO] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
[INFO] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
[INFO] at com.google.apphosting.runtime.SessionManagerUtil.serialize(SessionManagerUtil.java:28)
[INFO] at com.google.apphosting.runtime.DatastoreSessionStore.createEntityForSession(DatastoreSessionStore.java:73)
[INFO] at com.google.apphosting.runtime.DatastoreSessionStore.saveSession(DatastoreSessionStore.java:112)
[INFO] at com.google.apphosting.runtime.jetty9.SessionManager$AppEngineSession.save(SessionManager.java:145)
[INFO] at com.google.apphosting.runtime.jetty9.SaveSessionFilter.doFilter(SaveSessionFilter.java:43)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
[INFO] at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
[INFO] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
[INFO] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
[INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[INFO] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
[INFO] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
[INFO] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
[INFO] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
[INFO] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[INFO] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
[INFO] at com.google.apphosting.vmruntime.jetty9.VmRuntimeWebAppContext.doScope(VmRuntimeWebAppContext.java:299)
[INFO] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
[INFO] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
[INFO] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
[INFO] at org.eclipse.jetty.server.Server.handle(Server.java:497)
[INFO] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
[INFO] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
[INFO] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
[INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
[INFO] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
[INFO] at java.lang.Thread.run(Thread.java:745)
As you see there:
[INFO] at com.google.apphosting.runtime.SessionManagerUtil.serialize(SessionManagerUtil.java:28)
[INFO] at com.google.apphosting.runtime.DatastoreSessionStore.createEntityForSession(DatastoreSessionStore.java:73)
[INFO] at com.google.apphosting.runtime.DatastoreSessionStore.saveSession(DatastoreSessionStore.java:112)
[INFO] at com.google.apphosting.runtime.jetty9.SessionManager$AppEngineSession.save(SessionManager.java:145)
[INFO] at com.google.apphosting.runtime.jetty9.SaveSessionFilter.doFilter(SaveSessionFilter.java:43)
server is trying to put MultiPartInputStreamParser into user Session (and save to database). You shouldn't do that.