"javax.servlet.ServletException:非HTTP请求或响应"在JBoss [英] "javax.servlet.ServletException: non-HTTP request or response" in JBoss

查看:269
本文介绍了"javax.servlet.ServletException:非HTTP请求或响应"在JBoss的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的jboss在尝试运行我的应用程序(spring mvc)时抛出了无法描述的错误.它可以正常部署,并且此异常不会告诉我任何有用的信息,因此我真的不知道该怎么办.我无法调试,无法真正做任何事情:

My jboss is throwing undescriptive error while trying to run my application (spring mvc). It deploys ok, and this exception doesn't tell me anything useful so I don't really know what to do. I can't debug , can't do anything really :


    13:00:01,262 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 2m:13s:790ms

**Started successfully**

从浏览器运行应用程序时,会发生这种情况:

While running the application from the browser this happens :

13:00:09,456 ERROR [[appServlet]] Servlet.service() for servlet appServlet threw exception
javax.servlet.ServletException: non-HTTP request or response
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:818)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

推荐答案

当无法将参数分别强制转换为HttpServletRequestHttpServletResponse时,将在HttpServlet.service(ServletRequest, ServletResponse)中抛出该错误.

This gets thrown in HttpServlet.service(ServletRequest, ServletResponse) when the parameters can't be cast to HttpServletRequest and HttpServletResponse respectively.

这意味着两件事之一:

  • 参数的类型错误(不太可能)或
  • 某些过滤器使用的是这些类型的错误副本,并带有错误的类加载器(例如,如果您通过Webapp交付了自己的servlet-api-x.x.jar副本).
  • the parameters are of the wrong type (unlikely) or
  • some filter is using the wrong copy of those types, loaded with a wrong classloader (for example if you deliver your own copy of servlet-api-x.x.jar with your webapp).

这篇关于"javax.servlet.ServletException:非HTTP请求或响应"在JBoss的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆