2

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

Rishikesh Darandale
  • 3,222
  • 4
  • 17
  • 35
legend-is-back
  • 443
  • 2
  • 12
  • There is no enough information to know where the error comes from, lets try this, go to tomcat `logs` folder and open the `catalina.out` file, review it and see if there is some kind of exception and share it to the question, I mean not the entire log, but at least the exception that you get in catalina.out or catalina*.og – Daniel C. Aug 29 '17 at 11:34
  • @DanielC. There is nothing in logs folder since i am running it through eclipse at the moment not as deployed war file, eclipse does not show any error it continuous its work and shows the result of the work but the chrome debug shows an undefined error ! – legend-is-back Aug 29 '17 at 11:49
  • What messages are displayed in the browser's JavaScript console? Posting more code (e.g., Java, JSF pages) would be helpful, if possible. – Dave Jarvis Sep 05 '17 at 19:56

1 Answers1

3

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

Rishikesh Darandale
  • 3,222
  • 4
  • 17
  • 35