java.lang.NoClassDefFoundError: javax.servlet.FilterChain is a restricted class.

233 views
Skip to first unread message

J Han

unread,
Feb 23, 2016, 8:14:46 PM2/23/16
to Google App Engine

I am new to Google App Engine. When try to use it, I immediately hit this exception. I have googled that problem and found a couple of solutions. But none of the solutions applied to my case. 
Anyone have idea what could be wrong?

I am use Java8, Eclipse Luna, and installed Google plugin to my Eclipse. See attached screenshot gae-1.jpg.
I created a web Application Project and run it as Web Application. See attached gae-2.jpg.

When I point my browser to http://localhost:8888/gaeservlet, it returns HTTP 500 error. And there is exception in my Eclipse application console:

Feb 23, 2016 5:03:10 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
********************************************************
There is a new version of the SDK available.
-----------
Latest SDK:
Release: 1.9.32
Timestamp: Thu Dec 10 11:32:34 PST 2015
API versions: [1.0]

-----------
Your SDK:
Release: 1.9.30
Timestamp: Wed Nov 04 17:09:48 PST 2015
API versions: [1.0]

-----------
Please visit https://developers.google.com/appengine/downloads for the latest SDK.
********************************************************
Feb 23, 2016 5:03:12 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.9.30\appengine-java-sdk-1.9.30\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\jhan\workspace\GaeServlet\war\WEB-INF\appengine-web.xml'
Feb 23, 2016 5:03:12 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Feb 23, 2016 5:03:12 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Feb 23, 2016 5:03:13 PM com.google.apphosting.utils.jetty.JettyLogger info
Feb 23, 2016 5:03:13 PM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:8888/
Feb 23, 2016 5:03:13 PM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
Feb 23, 2016 5:03:13 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running
Feb 23, 2016 5:03:21 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error for /gaeservlet
java.lang.NoClassDefFoundError: javax.servlet.FilterChain is a restricted class. Please see the Google  App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:52)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
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.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:512)
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 org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


gae-3.jpg
gae-1.jpg
gae-2.jpg

Nick (Cloud Platform Support)

unread,
Feb 24, 2016, 5:44:17 PM2/24/16
to Google App Engine
It appears that some code you are attempting to use (possibly in a library?) is attempting to access javax.servlet.FilterChain, which, as described, is disallowed by the GAE runtime environment. Could you share some more details about your project?

J Han

unread,
Feb 29, 2016, 2:05:49 PM2/29/16
to Google App Engine
I just created a Google Web Application Project, see attached screenshot gae-2.jpg, and without any changes,  run it as Web Application.

Nick (Cloud Platform Support)

unread,
Feb 29, 2016, 6:32:37 PM2/29/16
to Google App Engine
Using the same version of the SDK I'm unable to replicate this behaviour. Perhaps you should download a fresh copy of the SDK, in the chance that your version is somehow corrupted? I can't really think of much else at the moment. Can you try to run the same project using the dev_appserver.sh script in the SDK?
Reply all
Reply to author
Forward
0 new messages