Inexplicable NumberFormatException in appengine java application

64 views
Skip to first unread message

Nicanor Babula

unread,
Apr 13, 2013, 4:24:58 AM4/13/13
to google-a...@googlegroups.com
Hello,

Today, our application started raising inexplicable NumberFormatExceptions out of nothing and for no obvious reason. Also, it is unable to identify the cause, the stack trace doesn't point to any of our application's code.

Here is the stack trace:
[code]
Uncaught exception from servlet
javax.servlet.UnavailableException: java.lang.NumberFormatException: null
	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 cri.domodentweb.server.servlets.ACLFilter.doFilter(ACLFilter.java:56)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at cri.domodentweb.server.servlets.AccountStatsFilter.doFilter(AccountStatsFilter.java:61)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at cri.domodentweb.server.servlets.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:62)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	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:35)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:57)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
	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:266)
	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:146)
	at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:438)
	at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
	at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
	at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
	at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
	at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
	at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
	at java.lang.Thread.run(Thread.java:722)
[/code]

This is not the first time we're seeing this errors out of nothing.
Please, could some one help us identify the cause of the problem? Anyone had this problem?

appid: domodentweb2 (version 14e)
sdk: 1.7.6 - java
datastore: HRD


Thanks,
Cristian

Vinny P

unread,
Apr 13, 2013, 4:02:51 PM4/13/13
to google-a...@googlegroups.com
Hi Nicanor.

The source code for org.mortbay.jetty.servlet.ServletHolder is here: http://grepcode.com/file/repo1.maven.org/maven2/org.mortbay.jetty/jetty/6.1.7/org/mortbay/jetty/servlet/ServletHolder.java/  . Of course, the problem is that I don't know what version of Jetty that AppEngine production uses, so this is harder than just looking at source code. 

My educated guess is that a servlet (either your servlet or the framework's servlet) is failing to initialize for some reason (ServletHolder manages the initialization and run of your servlet, which is why it's called a Holder). Due to the failure to initialize, the initServlet method is calling makeUnavailable to signal that the servlet cannot accept any requests. What is your code doing during initialization? You may need to investigate it, and perhaps move code out of your init.


-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

@GOV on AppDotNet: https://alpha.app.net/gov


Nicanor Babula

unread,
Apr 13, 2013, 4:14:09 PM4/13/13
to google-a...@googlegroups.com

In fact, you were right. There were a couple of servlets that failed to initialize due to a NumberFormatException. I had to go back in the logs, just before the exception mentioned earlier started to happen.

Thank you for your answer.
Regards,
Cristian

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/3Wfryhok5Vc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Vinny P

unread,
Apr 13, 2013, 4:21:11 PM4/13/13
to google-a...@googlegroups.com
On Saturday, April 13, 2013 3:14:09 PM UTC-5, Nicanor Babula wrote:

In fact, you were right. There were a couple of servlets that failed to initialize due to a NumberFormatException. I had to go back in the logs, just before the exception mentioned earlier started to happen.

Thank you for your answer.
Regards,
Cristian


Good to hear! I love happy endings!

Have a good weekend,
-Vinny
Reply all
Reply to author
Forward
0 new messages