DWR

"Failed to find parameter: callCount"

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.0.M1
  • Fix Version/s: 3.0.RC1
  • Component/s: None
  • Description:
    Hide
    //#DWR-REPLY
    if (window.dwr) dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' });
    else if (window.parent.dwr) window.parent.dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' });
    Show
    //#DWR-REPLY if (window.dwr) dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' }); else if (window.parent.dwr) window.parent.dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' });

Activity

Hide
Joe Walker added a comment - 18/Feb/08 12:53 PM

You're going to have to give me more context on this. When does this happen?

Show
Joe Walker added a comment - 18/Feb/08 12:53 PM You're going to have to give me more context on this. When does this happen?
Hide
Kees de Kooter added a comment - 18/Feb/08 1:07 PM

I replaced dwr jar version 2.0.2 with 3.0.M1 in my application. The error message appears when a page containing dwr scripts is loaded.

Show
Kees de Kooter added a comment - 18/Feb/08 1:07 PM I replaced dwr jar version 2.0.2 with 3.0.M1 in my application. The error message appears when a page containing dwr scripts is loaded.
Hide
Kees de Kooter added a comment - 18/Feb/08 2:34 PM

Close the bug for now Joe. The problem disappeared after a restart of the app.

Show
Kees de Kooter added a comment - 18/Feb/08 2:34 PM Close the bug for now Joe. The problem disappeared after a restart of the app.
Hide
Kees de Kooter added a comment - 18/Feb/08 3:56 PM

I am sorry it is occurring again. Goimng to try to narrow it down a bit more.

Show
Kees de Kooter added a comment - 18/Feb/08 3:56 PM I am sorry it is occurring again. Goimng to try to narrow it down a bit more.
Hide
Joe Walker added a comment - 18/Feb/08 4:54 PM

Still going to close the bug for now, please open it again when you have more details.
Joe.

Show
Joe Walker added a comment - 18/Feb/08 4:54 PM Still going to close the bug for now, please open it again when you have more details. Joe.
Hide
Kees de Kooter added a comment - 19/Feb/08 10:47 AM

Found the source of my problems. I am using the Acegi framework to secure web requests. I noticed that is call is being done to /dwr/call/plaincall/__System.pageLoaded.dwr. Guess this is new in version 3.0.

After excluding *.dwr from the Acegi filter everything works fine now.

Show
Kees de Kooter added a comment - 19/Feb/08 10:47 AM Found the source of my problems. I am using the Acegi framework to secure web requests. I noticed that is call is being done to /dwr/call/plaincall/__System.pageLoaded.dwr. Guess this is new in version 3.0. After excluding *.dwr from the Acegi filter everything works fine now.
Hide
Damien B added a comment - 25/Mar/08 9:54 PM

Same problem in 2.0.3, this is not specific to 3.0. However, the problem cause is not DWR:

Request:
POST /xxxx/dwr/call/plaincall/ActionHandler.getSomethingHandler.dwr HTTP/1.1
Host: 192.168.1.127:8180
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Content-Type: text/plain
Referer: http://192.168.1.127:8180/xxxx/action.do
Content-Length: 224
Cookie: JSESSIONID=7683A9C2DB1DF3DF20D3465823D10647
Pragma: no-cache
Cache-Control: no-cache

callCount=1
c0-scriptName=ActionHandler
c0-methodName=getSomethingUseful
c0-id=0
batchId=1
page=/xxxx/action.do
httpSessionId=7683A9C2DB1DF3DF20D3465823D10647
scriptSessionId=023985A09F9FF91F6E49034B98522D0D

Response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/javascript;charset=ISO-8859-1
Content-Length: 428
Date: Tue, 25 Mar 2008 21:09:35 GMT

//#DWR-INSERT
//#DWR-REPLY
dwr.engine.remote.handleCallback("1","0",-1);
//#DWR-REPLY
if (window.dwr) dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' }, '1');
else if (window.parent.dwr) window.parent.dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' }, '1');

No trace in the server-side logs.

Context:
a Filter in the call chain was calling twice chain.doFilter. Since DWR has consumed the Request InputStream during the first call, there is nothing left to read. unfortunately, ServletInputStream does not provide any way to know how many bytes have been already read on it, so it's not possible for DWR to determine wether the request is truely empty or if it has been already read.

Show
Damien B added a comment - 25/Mar/08 9:54 PM Same problem in 2.0.3, this is not specific to 3.0. However, the problem cause is not DWR: Request: POST /xxxx/dwr/call/plaincall/ActionHandler.getSomethingHandler.dwr HTTP/1.1 Host: 192.168.1.127:8180 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5 Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive Content-Type: text/plain Referer: http://192.168.1.127:8180/xxxx/action.do Content-Length: 224 Cookie: JSESSIONID=7683A9C2DB1DF3DF20D3465823D10647 Pragma: no-cache Cache-Control: no-cache callCount=1 c0-scriptName=ActionHandler c0-methodName=getSomethingUseful c0-id=0 batchId=1 page=/xxxx/action.do httpSessionId=7683A9C2DB1DF3DF20D3465823D10647 scriptSessionId=023985A09F9FF91F6E49034B98522D0D Response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/javascript;charset=ISO-8859-1 Content-Length: 428 Date: Tue, 25 Mar 2008 21:09:35 GMT //#DWR-INSERT //#DWR-REPLY dwr.engine.remote.handleCallback("1","0",-1); //#DWR-REPLY if (window.dwr) dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' }, '1'); else if (window.parent.dwr) window.parent.dwr.engine.remote.handleBatchException({ name:'java.lang.IllegalArgumentException', message:'Failed to find parameter: callCount' }, '1'); No trace in the server-side logs. Context: a Filter in the call chain was calling twice chain.doFilter. Since DWR has consumed the Request InputStream during the first call, there is nothing left to read. unfortunately, ServletInputStream does not provide any way to know how many bytes have been already read on it, so it's not possible for DWR to determine wether the request is truely empty or if it has been already read.
Hide
Damien B added a comment - 25/Mar/08 10:36 PM

Checking ParseUtil, we see that the InputStream is closed, so we should have an IOException trying to read it again. But checking the Tomcat source code, I've found that in such a case, Tomcat does not raise an IOException, so no error is reported. I've opened a ticket https://issues.apache.org/bugzilla/show_bug.cgi?id=44673 . Maybe they'll say it's the normal behaviour...

Show
Damien B added a comment - 25/Mar/08 10:36 PM Checking ParseUtil, we see that the InputStream is closed, so we should have an IOException trying to read it again. But checking the Tomcat source code, I've found that in such a case, Tomcat does not raise an IOException, so no error is reported. I've opened a ticket https://issues.apache.org/bugzilla/show_bug.cgi?id=44673 . Maybe they'll say it's the normal behaviour...

People

Dates

  • Created:
    18/Feb/08 12:42 PM
    Updated:
    29/Nov/12 3:24 PM
    Resolved:
    31/Oct/08 3:06 PM