简体   繁体   English

使用eclipse从Tomcat 6.0升级到Tomcat 9.0 Undefined错误

[英]Upgrading from Tomcat 6.0 to Tomcat 9.0 Undefined error using eclipse

I have a project that is been published in Tomcat6 and the code is written eclipse I need to update the program and make some changes so while at it i decided to upgrade tomcat server too !!! 我有一个在Tomcat6中发布的项目,代码写为eclipse,我需要更新程序并进行一些更改,因此在此同时,我也决定升级tomcat服务器! without any changes i deployed the war file in to the tomcat9 which gave me many errors !!! 没有任何更改,我将war文件部署到了tomcat9中,这给了我很多错误! after fixing most of them i am stuck at one error which i cant solve !!! 修复了大多数问题后,我陷入了一个我无法解决的错误! when i run the project from eclipse adn debug from chrome i got the fallowing error message 当我从chrome运行eclipse adn调试项目时,收到错误消息

engine.js:1310 console.trace
dwr.engine._debug @ engine.js:1310
dwr.engine.defaultErrorHandler @ engine.js:164
dwr.engine._remoteHandleException @ engine.js:931
(anonymous) @ VM54506:4
dwr.engine._eval @ engine.js:980
dwr.engine._stateChange @ engine.js:869
batch.req.onreadystatechange @ engine.js:646
XMLHttpRequest.send (async)
dwr.engine._sendData @ engine.js:678
dwr.engine.endBatch @ engine.js:212
dwr.engine._execute @ engine.js:403

engine.js:1311 Error: undefined, Error

the facet core is (if i change them to 1.8 and 3.1 still gives the same error and also it does not work with tomcat6 anymore) : 方面的核心是(如果我将它们更改为1.8和3.1仍会给出相同的错误,并且它也不再适用于tomcat6):

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <fixed facet="java"/>
  <fixed facet="jst.web"/>
  <installed facet="java" version="1.5"/>
  <installed facet="jst.web" version="2.4"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

the problem is that the code actually works and finishes the job but the interface hangs on loading !!! 问题是代码实际上可以正常工作并完成工作,但是界面在加载时挂起!!! and it only says error nothing else !!! 它只说错误没有别的! 在此处输入图片说明

the information might not be enough for an answer but i cant share the thousends code here either any ideas about this problem ??? 该信息可能不足以给出答案,但我无法在此处共享thousends代码或有关此问题的任何想法?

I am almost giving up on tomcat9 - just tried the same war file on wildfly 10 and everything works fine 我几乎放弃了tomcat9-只是在wildfly 10上尝试了相同的war文件,一切正常

Looks like you use DWR framework with version 2.x . 看起来您在版本2.x使用了DWR框架。

When you migrate from tomcat6 to tomcat9 , tomcat7 and later uses HttpOnly true for cookies. tomcat6迁移到tomcat9tomcat7later对cookie使用HttpOnly true

There are two solutions to resolve this error as mentioned below: 有两种解决方案可以解决此错误 ,如下所述:

In tomcat9 , make the HttpOnly flag false in conf/context.xml . tomcat9 ,将conf/context.xmlHttpOnly标志设置为false

<Context useHttpOnly=”false”>

OR 要么

Upgrade the DWR version to 3.x 将DWR版本升级到3.x

I will recommend the later due to the security reason 由于安全原因,我会建议稍后

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM