在我的DWR应用程序中,我捕获了此踪迹,但奇怪的是,从应用程序角度看,没有任何问题发生,并且对于同一组步骤,它仅记录了一次。

有谁知道/遇到相似之处?

WARN  [org.directwebremoting.dwrp.BaseCallHandler] Exception while processing batch
java.lang.IllegalArgumentException: Failed to find parameter: batchId (check server log for more info).
        at org.directwebremoting.dwrp.Batch.extractParameter(Batch.java:143)
        at org.directwebremoting.dwrp.Batch.parseParameters(Batch.java:80)
        at org.directwebremoting.dwrp.Batch.<init>(Batch.java:60)
        at org.directwebremoting.dwrp.CallBatch.<init>(CallBatch.java:46)
        at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:76)
        at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:126)
        at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:144)
        at org.directwebremoting.servlet.DwrServlet.doGet(DwrServlet.java:131)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
        at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:745)

最佳答案

您正在使用Internet Explorer吗?

几周前我遇到了同样的错误。
经过一些调查/调试后,找到了原因。

如果您超过此限制,则Internet Explorer的GET请求的URL大小限制为2,083个字符(https://support.microsoft.com/en-us/kb/208427),它会自动剪切URL以匹配该大小(不说任何内容)。

如果检查DWR代码(engine.js),您将发现在存在crossDomain调用时,它最终将<script>标记用于请愿。这基本上是一个GET调用。在我的情况下,生成的网址大于Internet Explorer的限制,因此它会自动缩减为正确的大小。
DWR使用该batchID来识别请求,通常将其放在URL的末尾,因此当IE剪切URL时,通常batchId随该“更正”一起消失,使dwr抛出该异常,因为无法在URL上找到它。

为了解决这个问题,我被迫使用JSONP(http://directwebremoting.org/dwr/introduction/remoting_options.html

希望能帮助到你。

关于java - 处理批处理时出现WARN [org.directwebremoting.dwrp.BaseCallHandler]异常,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32602475/

10-10 01:48