Problem with latest (3.0.1) dwrdemo.war

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with latest (3.0.1) dwrdemo.war

Stefan Lorenz
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't load
successful.

It seem like Intro.getInsert() has a problem because browser responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html PUBLIC
\"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"
\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">\n<html
xmlns=\"http:\

and "SyntaxError: unterminated string literal" after calling
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr.

Is there anything to setup therefore?

The examples under http://localhost:8080/dwrdemo/dwr/index.html are working.

Regards,

Stefan


Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:

> Hi,
>
> If I deploy dwrdemo.war on a tomcat 8 the start page doesn't load
> successful.
>
> It seem like Intro.getInsert() has a problem because browser
> responds with
>
> throw 'allowScriptTagRemoting is false.';
> //#DWR-INSERT
> //#DWR-REPLY
> //#DWR-START#
> (function(){
> if(!window.dwr)return;
> var dwr=window.dwr._[0];
> dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html PUBLIC
> \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"
> \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dt
> d\">\n<html
> xmlns=\"http:\
>
> and "SyntaxError: unterminated string literal" after calling
> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr.
>
> Is there anything to setup therefore?
>
> The examples under
> http://localhost:8080/dwrdemo/dwr/index.html are working.
>
> Regards,
>
> Stefan

Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

>
> Hm, that's odd. It seems the response is being cut off.
> For starters, can you please do the same test on the same machine
> but with Tomcat 7 instead?
>
> Best regards
> Mike Wilson
>
> Stefan Lorenz wrote:
> > Hi,
> >
> > If I deploy dwrdemo.war on a tomcat 8 the start page doesn't load
> > successful.
> >
> > It seem like Intro.getInsert() has a problem because browser
> > responds with
> >
> > throw 'allowScriptTagRemoting is false.';
> > //#DWR-INSERT
> > //#DWR-REPLY
> > //#DWR-START#
> > (function(){
> > if(!window.dwr)return;
> > var dwr=window.dwr._[0];
> > dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html PUBLIC
> > \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"
> > \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dt
> > d\">\n<html
> > xmlns=\"http:\
> >
> > and "SyntaxError: unterminated string literal" after calling
> >
> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr.
> >
> > Is there anything to setup therefore?
> >
> > The examples under
> > http://localhost:8080/dwrdemo/dwr/index.html are working.
> >
> > Regards,
> >
> > Stefan
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat 8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete responses causing unterminated string literal errors on script evaluation and such.
In dwrdemo http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr seems to send an incomplete response. At any rate xhr status code is 200. Some examples work, some others not. Some links seem to lack attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit. Oracle's JVM 7 u80 64 bit.


2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:
There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same machine everything works just right up to latest Tomcat 7.x.x version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find anything obvious. Now I'm gonna try every 8.0.x Tomcat version to determine exactly at what point in time dows this issue show its face.

BTW, java.net is being shut down soon. Where is DWR's project going?

Regards


2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:
I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:
>
> Hm, that's odd. It seems the response is being cut off.
> For starters, can you please do the same test on the same machine
> but with Tomcat 7 instead?
>
> Best regards
> Mike Wilson
>
> Stefan Lorenz wrote:
> > Hi,
> >
> > If I deploy dwrdemo.war on a tomcat 8 the start page doesn't load
> > successful.
> >
> > It seem like Intro.getInsert() has a problem because browser
> > responds with
> >
> > throw 'allowScriptTagRemoting is false.';
> > //#DWR-INSERT
> > //#DWR-REPLY
> > //#DWR-START#
> > (function(){
> > if(!window.dwr)return;
> > var dwr=window.dwr._[0];
> > dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html PUBLIC
> > \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"
> > \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dt
> > d\">\n<html
> > xmlns=\"http:\
> >
> > and "SyntaxError: unterminated string literal" after calling
> >
> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr.
> >
> > Is there anything to setup therefore?
> >
> > The examples under
> > http://localhost:8080/dwrdemo/dwr/index.html are working.
> >
> > Regards,
> >
> > Stefan
>




--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

david@butterdev.com
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It
appears to be limited to the demo though.  If I hit
http://localhost:8080/dwrdemo/dwr/index.html and manually execute
requests things seem to be working.  You are seeing this on normal
requests within your app too?  Do any requests work?  Any difference
between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:

> Hi again, back with some further info.
>
> Just tested a few Tomcat versions now and we get this since Tomcat
> 8.0.0-RC1.
>
> In my own webapp I'm getting run time errors due to incomplete
> responses causing unterminated string literal errors on script
> evaluation and such.
> In dwrdemo
> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
> [2] seems to send an incomplete response. At any rate xhr status code
> is 200. Some examples work, some others not. Some links seem to lack
> attached event handlers for mouse aver/mouse click.
>
> Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
> Oracle's JVM 7 u80 64 bit.
>
> 2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:
>
>> There seems to be definitely some issue on Tomcat versions 8+.
>>
>> I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
>> machine everything works just right up to latest Tomcat 7.x.x
>> version (7.0.73 tested here).
>>
>> I've been perusing Tomcat's changelogs but have been unable to find
>> anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
>> determine exactly at what point in time dows this issue show its
>> face.
>>
>> BTW, java.net [4] is being shut down soon. Where is DWR's project
>> going?
>>
>> Regards
>>
>> 2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:
>>
>>> I can mention that historically these kinds of errors
>>> have often been related to various security products
>>> (personal firewalls etc) locally installed on the
>>> machine.
>>> Sometimes behaviour of these products change if
>>> accessing as localhost or through public ip.
>>>
>>> Best regards
>>> Mike
>>>
>>> Mike Wilson wrote:
>>>>
>>>> Hm, that's odd. It seems the response is being cut off.
>>>> For starters, can you please do the same test on the same
>>> machine
>>>> but with Tomcat 7 instead?
>>>>
>>>> Best regards
>>>> Mike Wilson
>>>>
>>>> Stefan Lorenz wrote:
>>>>> Hi,
>>>>>
>>>>> If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
>>> load
>>>>> successful.
>>>>>
>>>>> It seem like Intro.getInsert() has a problem because browser
>>>>> responds with
>>>>>
>>>>> throw 'allowScriptTagRemoting is false.';
>>>>> //#DWR-INSERT
>>>>> //#DWR-REPLY
>>>>> //#DWR-START#
>>>>> (function(){
>>>>> if(!window.dwr)return;
>>>>> var dwr=window.dwr._[0];
>>>>> dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
>>> PUBLIC
>>>>> "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>>>> "http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
>>>>> d">n<html
>>>>> xmlns="http:
>>>>>
>>>>> and "SyntaxError: unterminated string literal" after calling
>>>>>
>>>>
>>>
>> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
>>> [2].
>>>>>
>>>>> Is there anything to setup therefore?
>>>>>
>>>>> The examples under
>>>>> http://localhost:8080/dwrdemo/dwr/index.html [3] are working.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Stefan
>>>>
>>
>> --
>>
>> Saludos / Regards,
>> David Requena
>
> --
>
> Saludos / Regards,
> David Requena
>
>
> Links:
> ------
> [1] http://www.w3.org
> [2]
> http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
> [3] http://localhost:8080/dwrdemo/dwr/index.html
> [4] http://java.net
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena

Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

david@butterdev.com
I think you are onto something with https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.  I messed around with the encodings and hard-coded a few places to UTF-8 (instead of response.getCharacterEncoding) and I got the test page to load.  Still not exactly sure what the fix will be but I wanted to send an update. 

On 11/21/2016 05:00 PM, Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena


Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
In reply to this post by Mike Wilson
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

david@butterdev.com
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?

On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena


Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
Yes, I also ended up with the forwardToString bug. I can see that we are asking the response for UTF-8 but it still ends up with ISO-8859-1. Still haven't verified if this is because something bad DWR is doing or a bug in Tomcat.
BTW: I've found the cause and a solution for the dead event handlers on the demo front page.
 
Will post back later today.
 
Best regards
Mike
 
David Marginian wrote:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?

On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena


Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena
In reply to this post by david@butterdev.com
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

david@butterdev.com
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena


Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
I think I've nailed down the problems. It seems Tomcat 8+ behaves differently for RequestDispatcher.forward(), and the content length from our sub-request leaks over to the DWR response which is longer as it adds "wrapping" front and end. Results in truncation to the end.
Our current use of .forward() is a bit off-spec so I have rewritten some parts so it doesn't involve the parent response and it seems to work fine. Will run the test suite in different appservers.
I've created:
 
Best regards
Mike
 
David Requena wrote:
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
My tests went well. Here's a snapshot build including fixes for these bugs:
It would be great if you can try this out with your own apps and see if your problems are solved? If we don't hear about any further problems we will release these fixes as DWR 3.0.2.
 
Best regards
Mike
 
Mike Wilson wrote:
I think I've nailed down the problems. It seems Tomcat 8+ behaves differently for RequestDispatcher.forward(), and the content length from our sub-request leaks over to the DWR response which is longer as it adds "wrapping" front and end. Results in truncation to the end.
Our current use of .forward() is a bit off-spec so I have rewritten some parts so it doesn't involve the parent response and it seems to work fine. Will run the test suite in different appservers.
I've created:
 
Best regards
Mike
 
David Requena wrote:
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena

Many thanks for this, I'll be testing this tomorrow morning (CET TZ around here) and get backto you.


2016-11-28 17:02 GMT+01:00 Mike Wilson <[hidden email]>:
My tests went well. Here's a snapshot build including fixes for these bugs:
It would be great if you can try this out with your own apps and see if your problems are solved? If we don't hear about any further problems we will release these fixes as DWR 3.0.2.
 
Best regards
Mike
 
Mike Wilson wrote:
I think I've nailed down the problems. It seems Tomcat 8+ behaves differently for RequestDispatcher.forward(), and the content length from our sub-request leaks over to the DWR response which is longer as it adds "wrapping" front and end. Results in truncation to the end.
Our current use of .forward() is a bit off-spec so I have rewritten some parts so it doesn't involve the parent response and it seems to work fine. Will run the test suite in different appservers.
I've created:
 
Best regards
Mike
 
David Requena wrote:
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

David Requena

Thanks Mike!

My own tests have gone well too.
All issues are gone when using the interim dwr.jar file you posted yesterday.

Any hint about when will 3.0.2 get out?
It's a bit strange this went unnoticed for so long when even the demo app was impacted :-?

Big kudos!


2016-11-28 18:45 GMT+01:00 David Requena <[hidden email]>:

Many thanks for this, I'll be testing this tomorrow morning (CET TZ around here) and get backto you.


2016-11-28 17:02 GMT+01:00 Mike Wilson <[hidden email]>:
My tests went well. Here's a snapshot build including fixes for these bugs:
It would be great if you can try this out with your own apps and see if your problems are solved? If we don't hear about any further problems we will release these fixes as DWR 3.0.2.
 
Best regards
Mike
 
Mike Wilson wrote:
I think I've nailed down the problems. It seems Tomcat 8+ behaves differently for RequestDispatcher.forward(), and the content length from our sub-request leaks over to the DWR response which is longer as it adds "wrapping" front and end. Results in truncation to the end.
Our current use of .forward() is a bit off-spec so I have rewritten some parts so it doesn't involve the parent response and it seems to work fine. Will run the test suite in different appservers.
I've created:
 
Best regards
Mike
 
David Requena wrote:
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena
Reply | Threaded
Open this post in threaded view
|

Re: Problem with latest (3.0.1) dwrdemo.war

Mike Wilson
Administrator
That's great to hear! I'll resolve the tickets and discuss with David about the release but hopefully the next few weeks.
The forwardToString feature is an old and fairly odd thing in DWR's feature set so I expect not many use it, but it is surprising anyhow. Maybe few try the demo and instead go straight to hacking their own app.
 
Best regards
Mike
 
David Requena wrote:
Thanks Mike!

My own tests have gone well too.
All issues are gone when using the interim dwr.jar file you posted yesterday.

Any hint about when will 3.0.2 get out?
It's a bit strange this went unnoticed for so long when even the demo app was impacted :-?

Big kudos!


2016-11-28 18:45 GMT+01:00 David Requena <[hidden email]>:

Many thanks for this, I'll be testing this tomorrow morning (CET TZ around here) and get backto you.


2016-11-28 17:02 GMT+01:00 Mike Wilson <[hidden email]>:
My tests went well. Here's a snapshot build including fixes for these bugs:
It would be great if you can try this out with your own apps and see if your problems are solved? If we don't hear about any further problems we will release these fixes as DWR 3.0.2.
 
Best regards
Mike
 
Mike Wilson wrote:
I think I've nailed down the problems. It seems Tomcat 8+ behaves differently for RequestDispatcher.forward(), and the content length from our sub-request leaks over to the DWR response which is longer as it adds "wrapping" front and end. Results in truncation to the end.
Our current use of .forward() is a bit off-spec so I have rewritten some parts so it doesn't involve the parent response and it seems to work fine. Will run the test suite in different appservers.
I've created:
 
Best regards
Mike
 
David Requena wrote:
I vaguely remember following those steps 3 or 4 years, at the beginning of our application development. Will go back to them.
I'm also running tomcat 7 and 8.5 side by side trying to gather request/response differences.

2016-11-23 15:21 GMT+01:00 David Marginian <[hidden email]>:
Tomcat's wiki has a page dedicated to encoding:
https://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8

Have you tried these steps? 

I am a bit suspicious of the last comment on the issue you posted - https://bz.apache.org/bugzilla/show_bug.cgi?id=51408.

"I have changed these to explicitly use ISO-8859-1 for 8.0.x onwards. There are some places where UTF-8 may be a better choice in the future as standards move towards UTF-8. We can change these as users request it."

If changes were made to explicitly use ISO-8859-1 does that override the steps in the wiki?  We would probably need to download the Tomcat source and step through it to find out for sure. 


On 11/23/2016 06:59 AM, David Requena wrote:
Thanks David,

It could well be, I'm not familiar with dwr's code, nor tomcat's, after all.

Anyway, chances of to applications breaking with seemingly equal effects (dwr.engine._eval missing full data), since the same server version change, being caused by unrelated bugs sound slim.

What I plan on doing at this point is trying to reproduce the problem in the most simplistic, shareable, webapp possible.

In the mean time any pointers on how to best capture further information as you suggest will be most welcome.


2016-11-23 5:07 GMT+01:00 David Marginian <[hidden email]>:
David,
Our demo depends on a call that is not commonly used - WebApplicationContext.forwardToString - http://directwebremoting.org/dwr/documentation/server/generic.html.  It appears this is broken in Tomcat 8. We have a fairly extensive test suite (testdwr.war) that I just ran on Tomcat 8 and all of the ~200 tests are passing.  This doesn't mean you don't have a legitimate issue but my guess is that the demo not working may not be related to the issues you are seeing in your application.  I would suggest gathering more information about the application failures.  Do you have any servlet filters that could be the culprit? Can you gather more information on the failing requests/responses?


On 11/22/2016 01:10 PM, David Requena wrote:

Thanks both for looking into this!


El 22/11/2016 13:50, "Mike Wilson" <[hidden email]> escribió:
I have also reproduced the problem. Will look further into it later today.
Best regards
Mike
 
Mike Wilson wrote:
Thanks for all the input David! I'll take a look too and post back.
For your question about the java.net takedown; we're looking into alternatives and will post info during the coming months.
 
Best regards
Mike Wilson
 
David Requena wrote:
Oh yes, in fact I came over here looking for answers to my current woes. I wasn't actually aware the demo was suffering those too.

My webapp makes quite a lot of dwr calls and has been working for long on Tomcat 7. Recently we attempted to move it to a newer Tomcat release.

I'm getting the distinct felling that content lengths are not being correctly calculated under some circumstances. Here's what i can see so far:
  • The issue is: some seemingly successful requests, with a 200 status code, miss data at the end.
  • I can not reproduce the issue with requests yielding small size responses.
  • With larger responses the issue shows itself more and more frequently as the amount of data returned grows.
  • It happens only on responses incorporating a content-lenth header.
  • All responses with transfer-encoding="chunked" (hence, no content-length) yield complete data regardless of size.
  • Most of my responses in this app are content-type:"text/javascript;charset=utf-8". Don't know if related at all, but see below

I know its a long shot but the only change I can find in Tomcat's changelogs for 8.0.x is https://bz.apache.org/bugzilla/show_bug.cgi?id=51408 . Apparently some calls to getBytes(Charset.defaultCharset()) were made to use explicitly use ISO-8859-1.

It's not like I was writing code in Chinese but, could this conceivably be related to bad content-lenth calculation?



2016-11-21 22:56 GMT+01:00 <[hidden email]>:
I am seeing similar issues on Tomcat 8.5.8 running on Ubuntu.  It appears to be limited to the demo though.  If I hit http://localhost:8080/dwrdemo/dwr/index.html and manually execute requests things seem to be working.  You are seeing this on normal requests within your app too?  Do any requests work?  Any difference between working/non-working requests?

On 2016-11-21 07:32, David Requena wrote:
Hi again, back with some further info.

Just tested a few Tomcat versions now and we get this since Tomcat
8.0.0-RC1.

In my own webapp I'm getting run time errors due to incomplete
responses causing unterminated string literal errors on script
evaluation and such.
In dwrdemo
http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2] seems to send an incomplete response. At any rate xhr status code
is 200. Some examples work, some others not. Some links seem to lack
attached event handlers for mouse aver/mouse click.

Al my tests done on Windows 10 and Server 2008 R3, both 64 bit.
Oracle's JVM 7 u80 64 bit.

2016-11-21 14:22 GMT+01:00 David Requena <[hidden email]>:

There seems to be definitely some issue on Tomcat versions 8+.

I'm getting the same problem on Tomcat 8.0.32 and 8.5.4. On the same
machine everything works just right up to latest Tomcat 7.x.x
version (7.0.73 tested here).

I've been perusing Tomcat's changelogs but have been unable to find
anything obvious. Now I'm gonna try every 8.0.x Tomcat version to
determine exactly at what point in time dows this issue show its
face.

BTW, java.net [4] is being shut down soon. Where is DWR's project

going?

Regards

2016-11-17 14:37 GMT+01:00 Mike Wilson <[hidden email]>:

I can mention that historically these kinds of errors
have often been related to various security products
(personal firewalls etc) locally installed on the
machine.
Sometimes behaviour of these products change if
accessing as localhost or through public ip.

Best regards
Mike

Mike Wilson wrote:

Hm, that's odd. It seems the response is being cut off.
For starters, can you please do the same test on the same
machine
but with Tomcat 7 instead?

Best regards
Mike Wilson

Stefan Lorenz wrote:
Hi,

If I deploy dwrdemo.war on a tomcat 8 the start page doesn't
load
successful.

It seem like Intro.getInsert() has a problem because browser
responds with

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
//#DWR-START#
(function(){
if(!window.dwr)return;
var dwr=window.dwr._[0];
dwr.engine.remote.handleCallback("0","0",["<!DOCTYPE html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org [1]/TR/xhtml1/DTD/xhtml1-transitional.dt
d">n<html
xmlns="http:

and "SyntaxError: unterminated string literal" after calling



http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[2].

Is there anything to setup therefore?

The examples under
http://localhost:8080/dwrdemo/dwr/index.html [3] are working.

Regards,

Stefan


--

Saludos / Regards,
David Requena

--

Saludos / Regards,
David Requena


Links:
------
[1] http://www.w3.org
[2] http://localhost:8080/dwrdemo/dwr/call/plaincall/Intro.getInsert.dwr
[3] http://localhost:8080/dwrdemo/dwr/index.html
[4] http://java.net



--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena





--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena



--
Saludos / Regards,
David Requena