Upgrading from Tomcat 6.0 to Tomcat 9.0 Undefined error using eclipse

1.2k Views Asked by At

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 !!! without any changes i deployed the war file in to the tomcat9 which gave me many errors !!! 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

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) :

<?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 !!! enter image description here

the information might not be enough for an answer but i cant share the thousends code here either any ideas about this problem ???

I am almost giving up on tomcat9 - just tried the same war file on wildfly 10 and everything works fine

1

There are 1 best solutions below

0
On BEST ANSWER

Looks like you use DWR framework with version 2.x.

When you migrate from tomcat6 to tomcat9, tomcat7 and later uses HttpOnly true for cookies.

There are two solutions to resolve this error as mentioned below:

In tomcat9, make the HttpOnly flag false in conf/context.xml.

<Context useHttpOnly=”false”>

OR

Upgrade the DWR version to 3.x

I will recommend the later due to the security reason