2 qq 15253253 qq_15253253 于 2016.04.09 14:20 提问

DWR3.0 在jdk1.8版本中报错。

请教下各位,今天在1.8版本中部署DWR3.0后,发现不能进入dwr的调试页面,后台也报错。报错信息如下:

```java.lang.VerifyError: Inconsistent stackmap frames at branch target 2087
Exception Details:
Location:
sis/jsp/formula/formula_DWRCheckall.DWRCheckAll(Ljava/util/Map;Ljavax/servlet/http/HttpServletRequest;Ljava/sql/Connection;)Ljava/util/Map; @2087: aconst_null
Reason:
Type top (current frame, locals[53]) is not assignable to 'java/util/Vector' (stack map, locals[53])
Current Frame:
bci: @2080
flags: { }
locals: { 'java/util/Map', 'javax/servlet/http/HttpServletRequest', 'java/sql/Connection', 'java/util/Map', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, integer, integer, integer, integer, integer, integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'javax/servlet/http/HttpSession', 'sis/jsp/common/common_connect', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/sql/ResultSet', 'java/sql/Statement', 'java/sql/PreparedStatement', integer, top, 'java/util/HashMap', 'java/lang/StringBuffer', top, 'java/lang/StringBuffer', 'java/lang/StringBuffer', 'java/lang/StringBuffer', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, integer, integer, 'java/lang/String', integer, 'java/lang/String', 'java/util/Map', top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, 'java/util/Map' }
stack: { integer }
Stackmap Frame:
bci: @2087
flags: { }
locals: { 'java/util/Map', 'javax/servlet/http/HttpServletRequest', 'java/sql/Connection', 'java/util/Map', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, integer, integer, integer, integer, integer, integer, 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'javax/servlet/http/HttpSession', 'sis/jsp/common/common_connect', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/sql/ResultSet', 'java/sql/Statement', 'java/sql/PreparedStatement', integer, 'java/util/Vector', 'java/util/HashMap', 'java/lang/StringBuffer', top, 'java/lang/StringBuffer', 'java/lang/StringBuffer', 'java/lang/StringBuffer', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'java/lang/String', integer, integer, integer, 'java/lang/String', integer, 'java/lang/String', 'java/util/Map', top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, top, 'java/util/Map' }
stack: { }

    at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at org.directwebremoting.impl.SignatureParser.findMethod(SignatureParser.java:398)
at org.directwebremoting.impl.SignatureParser.parseDeclarationLine(SignatureParser.java:160)
at org.directwebremoting.impl.SignatureParser.parse(SignatureParser.java:91)
at org.directwebremoting.impl.DwrXmlConfigurator.loadSignature(DwrXmlConfigurator.java:475)
at org.directwebremoting.impl.DwrXmlConfigurator.configure(DwrXmlConfigurator.java:169)
at org.directwebremoting.impl.StartupUtil.configureFromDefaultDwrXml(StartupUtil.java:617)
at org.directwebremoting.impl.StartupUtil.configureContainerFully(StartupUtil.java:730)
at org.directwebremoting.servlet.DwrServlet.configureContainer(DwrServlet.java:113)
at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:72)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
环境如下:  tomcat8.0   jdk1.8 dwr3.0 



请各位看下指点个方向。谢谢


2个回答

qq_15253253
qq_15253253   2016.04.09 14:22

web.xml如下

    <servlet> 
        <servlet-name>dwr-invoker</servlet-name> 
        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

        <!-- Comet Mode Begin 默认的DWR为paggyback方式,comet需要增加如下配置 -->
        <init-param> 
            <param-name>activeReverseAjaxEnabled</param-name> 
            <param-value>true</param-value> 
        </init-param> 

        <init-param> 
            <param-name>pollAndCometEnabled</param-name><!--默认值:false描述:是指dwr的reverse ajax是使用polling和comet的方式。设置成true能增加服务器的加载能力,尽管DWR有保护服务器过载的机制。    --> 
            <param-value>true</param-value> 
        </init-param> 
        <!-- Comet Mode END -->

        <!-- Polling Mode BEGIN :Polling Mode 是一种轮询的方式,这可以避免长时间保持连接而产生的对服务器的占用,如果要使用轮询方式,在comet方式的基础上还要做以下配置。 -->
        <init-param>
            <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>
            <param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value>
        </init-param> 
        <init-param>
            <param-name>disconnectedTime</param-name>
            <param-value>5000</param-value><!-- 轮询周期默认为5000,5秒 -->
        </init-param>
        <!-- Polling Mode END-->

        <init-param> 
            <!--
                默认值:false 
                描述:设置成true使DWR能够debug和进入测试页面 http://127.0.0.1:8080/wbtj201009/dwr
            -->
            <param-name>debug</param-name> 
            <param-value>true</param-value> 
        </init-param> 
        <!--多个用户自定义配置文件,默认是web-inf/dwr.xml
        <init-param> 
            <param-name>config-1</param-name> 
            <param-value>/WEB-INF/dwr/dwr.xml</param-value> 
        </init-param>
        --> 
        <init-param> 
            <param-name>allowGetForSafariButMakeForgeryEasier</param-name><!--默认值:false描述:置成true使DWR工作在Safari 1.x , 会稍微降低安全性。--> 
            <param-value>false</param-value> 
        </init-param> 
        <!-- 
            加入跨域调用配置信息 start
            以下两个参数tomcat7下必须这样配置,否则会引起DWR CSRF Security Error(tomcat7中会出现这个错误)
         -->
        <init-param> 
            <!--
                默认值:true
                描述:设置成false使能够从其他域进行请求。注意,这样做会在安全性上有点冒险,参考一下这篇文章,在没有理解这个后果前不要设置成为false。
            -->
            <param-name>crossDomainSessionSecurity</param-name> 
            <param-value>false</param-value> 
        </init-param> 
        <init-param>  
            <param-name>allowScriptTagRemoting</param-name>  
            <param-value>true</param-value>  
        </init-param> 
        <!-- 
            加入跨域调用配置信息 end
         -->

        <init-param> 
            <!--
                默认值:100 
                描述:最大等待线程数量。
            -->
            <param-name>maxWaitingThreads</param-name> 
            <param-value>100</param-value> 
        </init-param> 
        <init-param> 
            <!--
                默认值:29000(单位:毫秒) 
                描述:对一个打开流前的反应,等待的最大时间 
            -->
            <param-name>preStreamWaitTime</param-name> 
            <param-value>29000</param-value> 
        </init-param> 
        <init-param> 
            <!--
                默认值:1000(单位:毫秒) 
                描述:对一个打开流后的反应,等待的最大时间
            -->
            <param-name>postStreamWaitTime</param-name> 
            <param-value>1000</param-value> 
        </init-param> 
        <init-param> 
            <!--
            -->
            <param-name></param-name> 
            <param-value></param-value> 
        </init-param> 
        <init-param> 
            <!--
                默认值:20 
                描述:一次批量(batch)允许最大的调用数量。(帮助保护Dos攻击)
            -->
            <param-name>maxCallCount</param-name> 
            <param-value>1000</param-value> 
        </init-param> 
        <init-param> 
            <!--
                描述:script session 的超时设置 超时服务器就不会返回结果
                默认值:1800000(30分钟) 
            -->
            <param-name>scriptSessionTimeout</param-name> 
            <param-value>100000000</param-value> 
        </init-param> 
        <init-param> 
            <param-name>classes</param-name> 
            <param-value>java.lang.Object</param-value> 
        </init-param> 
        <init-param>   
            <param-name>maxWaitAfterWrite</param-name>   
            <param-value>100</param-value>   
        </init-param>   
        <init-param> 
            <param-name>initApplicationScopeCreatorsAtStartup</param-name> 
            <param-value>true</param-value> 
        </init-param> 

    </servlet> 

    <servlet-mapping> 
        <servlet-name>dwr-invoker</servlet-name> 
        <url-pattern>/dwr/*</url-pattern> 
    </servlet-mapping> 
    <!--DWR3配置结束-->
CSDNXIAON
CSDNXIAON   2016.04.09 14:32

JDK各个版本的新特性 1.5-1.8
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!