开发者社区 问答 正文

压测时报错,求高手解答?报错

was启动后,单独访问没有问题,做压测时就会报错,25个并发,日志如下:


[16-5-23 9:33:59:894 CST] 000004fc webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet 错误]-[Dispatcher]: java.lang.IllegalStateException 
        at com.ibm.ws.session.http.HttpSessionImpl.isNew(HttpSessionImpl.java:313) 
        at com.ibm.ws.session.SessionContext.doSecurityCheck(SessionContext.java:554) 
        at com.ibm.ws.session.SessionContext.getIHttpSession(SessionContext.java:514) 
        at com.ibm.ws.session.SessionContext.getIHttpSession(SessionContext.java:426) 
        at com.ibm.ws.webcontainer.srt.SRTRequestContext.getSession(SRTRequestContext.java:113) 
        at com.ibm.ws.webcontainer.srt.SRTServletRequest.getSession(SRTServletRequest.java:2167) 
        at com.ibm.ws.webcontainer.srt.SRTServletRequest.getSession(SRTServletRequest.java:2151) 
        at com.abc.app.core.interceptor.RedirectInterceptor.preHandle(RedirectInterceptor.java:74) 
        at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:130) 
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:932) 
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) 
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) 
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) 
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) 
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) 
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107) 
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) 
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:919) 
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287) 
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
        at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205) 
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881) 

[16-5-23 9:33:59:895 CST] 000004f8 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: 未捕获到 service() 异常的根本原因 Dispatcher:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException 
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973) 
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) 
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) 
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) 
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967) 
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107) 
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) 
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:919) 
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316) 
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287) 
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
        at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205) 
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881) 
Caused by: java.lang.IllegalStateException 
        at com.ibm.ws.session.http.HttpSessionImpl.isNew(HttpSessionImpl.java:313) 
        at com.ibm.ws.session.SessionContext.doSecurityCheck(SessionContext.java:554) 
        at com.ibm.ws.session.SessionContext.getIHttpSession(SessionContext.java:514) 
        at com.ibm.ws.session.SessionContext.getIHttpSession(SessionContext.java:426) 
        at com.ibm.ws.webcontainer.srt.SRTRequestContext.getSession(SRTRequestContext.java:113) 
        at com.ibm.ws.webcontainer.srt.SRTServletRequest.getSession(SRTServletRequest.java:2167) 
        at com.ibm.ws.webcontainer.srt.SRTServletRequest.getSession(SRTServletRequest.java:2151) 
        at com.abc.app.core.interceptor.RedirectInterceptor.preHandle(RedirectInterceptor.java:74) 
        at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:130) 
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:932) 
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) 
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) 



RedirectInterceptor 74行的代码是:request.getsession().getAttribute("currentUser")

展开
收起
爱吃鱼的程序员 2020-06-09 14:26:32 538 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    求解答啊,搞不定了请问这个问题有没有解决呢?我们最近做压力测试也遇到了这个问题。

    压测时候出现同样的问题,请问楼主最终解决了吗?

    2020-06-09 14:26:48
    赞同 展开评论