每次我从其他服务器收到重定向呼叫时都会显示此警告(回叫配置为使用特定详细信息进行重定向)。收到后我拨打一个电话后,将请求发送到我的页面。
流程完成,异常警告。
异常的堆栈跟踪。
doHandle: (ServletHandler.java:624)
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: WRITER
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
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.full.util.DomainFilter.doFilter(DomainFilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
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:202)
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:680)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:642)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:612)
at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:806)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:274)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: WRITER
我正在使用带有GAE(谷歌应用程序引擎)的java 8.如果我切换回java7版本,上面的警告不显示。
示例代码
@Override
public String callBack(HttpServletRequest request, HttpServletResponse response) {
logger.info("inside callback method Integration");
try{
logger.info("the request uri "+request.getQueryString());
//data store call to get more detail .
HttpClient httpClient = new HttpClient();
String responseString = httpClient.post(accessUrl, headerMap, params);
logger.info("the resposne String is " + responseString);
Map<String, Object> responseMap = StringConverterUtil.stringToMap(responseString);
logger.info("the quickBooks response string is " + responseMap);
logger.info("the eventConfigObject is " + request.getSession().getAttribute("eventConfigObject"));
request.getSession().setAttribute("isNoAccountFlag", true);
if (responseMap != null && responseMap.containsKey("access_token")) {
logger.info("the domain name is " + platform.getDomainName());
// save the detail on datastore
request.getRequestDispatcher("/jsp/authenticateSuccess.jsp?status=success").forward(request, response);
return null;
}
}
catch(Exception e){
logger.log(Level.ERROR, e.toString(), e);
try {
request.getRequestDispatcher("/jsp/authenticateSuccess.jsp?status=failed").forward(request, response);
} catch (ServletException e1) {
logger.log(Level.ERROR, e.toString(), e);
} catch (IOException e1) {
logger.log(Level.ERROR, e.toString(), e);
}
}
return null;
}