-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meteor+Struts2: X-Atmosphere-tracking-id - BigDecimal cannot be cast to java.lang.String #1367
Comments
So you are setting an attribute with BigDecimal? Something is broken in your enviroment as Atmosphere receive that value from the browser as a String. Can you turn the log to trace and paste it here? |
that was fast :-)
|
Perhaps its worth to mention: There is no meteor created in the struts action (test/87/bla). Edit: I think I found out why this happens: Meteor uses the StrutsPrepareAndExecuteFilter as a parameter StrutsRequestWrapper line 97:
Which does OGNL stuff and ends up in: OgnlOps line 287:
|
Hum it seems Struts is faulty here...why does it chang ethe value from String to BigDecimal? I need to reproduce the issue. |
You should have a glance at the StrutsRequestWrapper. (attached below)
in your struts.xml, but this will change the behaviour to plain JSP return (instead of rendered html), even if a struts action is sucessfully executed.
|
Where I'm lost is Atmosphere doesn't set any BigDecimal, but String. So it seems Struts reset the value from a String to a BigDecimal...that makes no sense. I can catch the exception, but clearly I need to understand why Struts is wrongly resetting the value. |
Well.. Atmosphere does not read directly. It uses the underlying filter. Is there a possibility to access the values directly or: call ..toString() on the values :-) |
But a BigDecimal.toString will gives all kind of shitty results. The fact that the property is wrapped makes no sense for other Framework IMO. Who wrote that crazy code :-) |
hmmm... do you have to use the underlying filter for request to params? I mean you are the first one who gets the request, so you could save the params and access them directly... |
Based on the stack trace, the request is wrapped much before Atmosphere gets invoked. So I could navigate the request's wrap, but still Struts is quite broken IMO |
You should... otherwise you are not guaranteed, that frameworks might override getters (like Struts...) |
Kind of agree...but Atmosphere is used in a lot of framework and never faced such craziness....will take a look. |
Ok fixed. Try 2.0.4-SNAPSHOT or 2.1.0-SNAPSHOT |
On Version 2.0.3 native.
Same Issue with 2.1.0
Using Meteor with Meteor Servlet and Struts2.
Line 311 in AtmosphereRequest causes the error:
if (s.startsWith(X_ATMOSPHERE) && isNotNoOps()) {
name = (String) b.request.getAttribute(s);
}
The text was updated successfully, but these errors were encountered: