javax.servlet.ServletException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Create asynchronous resource: {code:java} @GET @Path("/internal-server-error") public void internalServerError (@Suspended final AsyncResponse ar) { new Thread(new Runnable() { @Override public void run() { String result = veryExpensiveOperation(); ar.resume(result); } private String veryExpensiveOperation() { return "Hola"; } }).start(); }; {code} Client request: GET http://localhost:port/app/internal-server-error We get exception traces with error message {color:red}javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container.{color} {code} 11/12/2013 11:36:21.252 WARN [SOCIAL] org.eclipse.jetty.servlet.ServletHandler - javax.servlet.ServletException: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:375) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1568) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66) ~[guice-servlet-3.0.jar:?] at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) ~[guice-servlet-3.0.jar:?] at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) ~[guice-servlet-3.0.jar:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at filter.CrossOriginResourceSharingFilter.doFilter(CrossOriginResourceSharingFilter.java:24) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1556) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:208) ~[javamelody-core-1.47.0.jar:1.47.0] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181) ~[javamelody-core-1.47.0.jar:1.47.0] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1548) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524) [jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568) [jetty-security-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453) [jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.Server.handle(Server.java:459) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505) [jetty-io-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) [jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) [jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at java.lang.Thread.run(Thread.java:744) [?:1.7.0_45] Caused by: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:361) ~[jersey-container-servlet-core-2.4.1.jar:?] ... 31 more {code}
    via by RobertoGB,
  • Create asynchronous resource: {code:java} @GET @Path("/internal-server-error") public void internalServerError (@Suspended final AsyncResponse ar) { new Thread(new Runnable() { @Override public void run() { String result = veryExpensiveOperation(); ar.resume(result); } private String veryExpensiveOperation() { return "Hola"; } }).start(); }; {code} Client request: GET http://localhost:port/app/internal-server-error We get exception traces with error message {color:red}javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container.{color} {code} 11/12/2013 11:36:21.252 WARN [SOCIAL] org.eclipse.jetty.servlet.ServletHandler - javax.servlet.ServletException: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:375) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218) ~[jersey-container-servlet-core-2.4.1.jar:?] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1568) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66) ~[guice-servlet-3.0.jar:?] at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) ~[guice-servlet-3.0.jar:?] at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) ~[guice-servlet-3.0.jar:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at filter.CrossOriginResourceSharingFilter.doFilter(CrossOriginResourceSharingFilter.java:24) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1556) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:208) ~[javamelody-core-1.47.0.jar:1.47.0] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181) ~[javamelody-core-1.47.0.jar:1.47.0] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1548) ~[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524) [jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568) [jetty-security-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453) [jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.Server.handle(Server.java:459) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) [jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505) [jetty-io-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) [jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) [jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at java.lang.Thread.run(Thread.java:744) [?:1.7.0_45] Caused by: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) ~[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983) ~[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:361) ~[jersey-container-servlet-core-2.4.1.jar:?] ... 31 more {code}
    via by RobertoGB,
  • REST async operation throws ProcessingException
    via Stack Overflow by Dc01_xx
    ,
    • javax.servlet.ServletException: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:375)[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)[jersey-container-servlet-core-2.4.1.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)[jersey-container-servlet-core-2.4.1.jar:?] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1568)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)[guice-servlet-3.0.jar:?] at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)[guice-servlet-3.0.jar:?] at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)[guice-servlet-3.0.jar:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1539)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at filter.CrossOriginResourceSharingFilter.doFilter(CrossOriginResourceSharingFilter.java:24)[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1556)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:208)[javamelody-core-1.47.0.jar:1.47.0] at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181)[javamelody-core-1.47.0.jar:1.47.0] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1548)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)[jetty-security-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)[jetty-servlet-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.Server.handle(Server.java:459)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:280)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)[jetty-server-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)[jetty-io-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[jetty-util-9.1.0.v20131115.jar:9.1.0.v20131115] at java.lang.Thread.run(Thread.java:744)[?:1.7.0_45] Caused by: javax.ws.rs.ProcessingException: Attempt to suspend a connection of an asynchronous request failed in the underlying container. at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:315)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:297)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:267)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)[jersey-common-2.4.1.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983)[jersey-server-2.4.1.jar:?] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:361)[jersey-container-servlet-core-2.4.1.jar:?] ... 31 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,