Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 421311

Summary: HTTP Status 500 - java.lang.IllegalArgumentException
Product: [RT] RAP Reporter: Robert Mägel <r.maegel>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan, rsternberg
Version: 2.1   
Target Milestone: 2.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
The stack trace
none
Headers none

Description Robert Mägel CLA 2013-11-08 04:36:10 EST
Created attachment 237304 [details]
The stack trace

Sometimes we get this unusual error when we do random clicks on our RAP application "java.lang.IllegalArgumentException java.nio.Buffer.position(Buffer.java:236)". 
The error breaks the application and returns http status 500 with full stack trace. It is not always reproducible, hence cannot provide an exact code snippet.
The error can occur after login. In another case the error occurs after an hour working with the application.

 Attached full stack trace.
Comment 1 Ivan Furnadjiev CLA 2013-11-08 05:14:08 EST
Which Tomcat version are you using? Is this happen under Linux or Windows? Could you provide the request body that leads to exception?
Comment 2 Ivan Furnadjiev CLA 2013-11-08 05:39:32 EST
... are you using IE8?
Comment 3 Robert Mägel CLA 2013-11-08 06:26:14 EST
We use JBoss 5.1.1. The server runs under Linux.

I will send you the headers as soon as I am get it next time.

The error also occurs on IE 10.
Comment 4 Ivan Furnadjiev CLA 2013-11-08 06:26:57 EST
(In reply to comment #2)
> ... are you using IE8?
Sometimes IE send (re-send) broken/illegal requests and we can't do anything about it. See:
[1] http://stackoverflow.com/questions/4796305/why-does-internet-explorer-not-send-http-post-body-on-ajax-call-after-failure
[2] http://support.microsoft.com/kb/895954
If this is the case (IE under Windows XP) I tend to close this bug as NOT_ECLIPSE.
Comment 5 Robert Mägel CLA 2013-11-08 07:39:59 EST
The problem doesn't occur with RAP 2.0.
Comment 6 Ivan Furnadjiev CLA 2013-11-08 08:38:46 EST
Hi Robert, could you try the patch attached to the bug 411616 (attachment 233559 [details])?
Comment 7 Robert Mägel CLA 2013-11-09 05:02:13 EST
Created attachment 237327 [details]
Headers

Hi Ivan,

Thanks for the patch. I could not try it yet.

The problem occurs also in Firefox.

First I send you the headers captured with Firebug.
Comment 8 Ralf Sternberg CLA 2013-11-12 04:31:31 EST
Robert, could you please try to reproduce the issue with the M3 milestone that will be published Friday this week? This milestone contains a new version of the JSON parser with the reading part completely revised. Chances are that this fixes this problem.
Comment 9 Robert Mägel CLA 2013-11-12 09:37:27 EST
We tested the patch. The error did not occur, but we can not exclude that the error is still existing because the error occured not reproducible.

Thanks for the information about the new milestone. We will test the version next week and write the result here.
Comment 10 Robert Mägel CLA 2013-11-22 02:52:54 EST
We can not test the new milestone at the moment because of the bug: Bug 421942 - [Dialog] Initial size is too big  (https://bugs.eclipse.org/bugs/show_bug.cgi?id=421942).
Comment 11 Ivan Furnadjiev CLA 2013-11-22 03:47:14 EST
(In reply to comment #10)
> We can not test the new milestone at the moment because of the bug: Bug 421942 -
> [Dialog] Initial size is too big
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=421942).
I've added a comment to bug 421942 comment#2 for a workaround.
Comment 12 Ralf Sternberg CLA 2013-12-02 08:56:17 EST
If this is not related to the JSON parser, this bug should be fixed in RC1 with the changes for bug 411616.

Please reopen if you can reproduce the issue with >= RAP 2.2 RC1.