You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/10/23 01:05:42 UTC
[Bug 55691] New: javax.el.ArrayELResolver.setValue not supporting
arrays of primitives
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
Bug ID: 55691
Summary: javax.el.ArrayELResolver.setValue not supporting
arrays of primitives
Product: Tomcat 6
Version: 6.0.37
Hardware: All
OS: Linux
Status: NEW
Severity: blocker
Priority: P2
Component: Servlet & JSP API
Assignee: dev@tomcat.apache.org
Reporter: taly81010@yahoo.com
was working in tomcat 6.0.20
ERROR javax.faces.context.ExceptionHandlerWrapper -
javax.faces.component.UpdateModelException: java.lang.ClassCastException:
Unable to add an object of type [java.lang.Integer] to an array of objects of
type [int]
java.lang.ClassCastException: Unable to add an object of type
[java.lang.Integer] to an array of objects of type [int]
at javax.el.ArrayELResolver.setValue(ArrayELResolver.java:94)
at
com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:255)
at
com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:281)
at org.apache.el.parser.AstValue.setValue(AstValue.java:158)
at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
at
com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
at javax.faces.component.UIInput.updateModel(UIInput.java:818)
at javax.faces.component.UIInput.processUpdates(UIInput.java:735)
at javax.faces.component.UIData.iterate(UIData.java:2001)
at javax.faces.component.UIData.processUpdates(UIData.java:1253)
at
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
at
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1231)
at
com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Mark Thomas <ma...@apache.org> ---
This has been fixed in 6.0.x and will be included in 6.0.38 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #2 from taly <ta...@yahoo.com> ---
(In reply to Christopher Schultz from comment #1)
> Please re-try with a Tomcat 6 version that has been released in the last 4
> years. 6.0.20 was released in summer 2009. Try again with Tomcat 6.0.37,
> which has had a bunch of fixes in the meantime. If you can reproduce with
> 6.0.latest, we can probably fix it.
>
> While you're at it, please test against Tomcat 7.0.42. There are lots of
> differences between Tomcat 6 and 7, but much less between Tomcat 7 and 8
> (where a fix is more likely to happen faster).
Sorry should have been more clear.
It was tested against 6.0.37
The stacktrace is from 6.0.37 not 6.0.20
6.0.20 was when it was still working
Did a quick test against 7.0.27 and getting same error no primitives support
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #6 from Mark Thomas <ma...@apache.org> ---
This has been fixed in 8.0.x and 7.0.x and will be included in 7.0.48 onwards
and 8.0.0-RC6 onwards. It has also been proposed for 6.0.x.
Note that the suggested patch was not used. The Util class already contained
the necessary version of isAssignableFrom(). This was used instead. I also
added a test case to confirm the fix.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
--- Comment #7 from Mark Thomas <ma...@apache.org> ---
Reduce severity to something sensible.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
Christopher Schultz <ch...@christopherschultz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Please re-try with a Tomcat 6 version that has been released in the last 4
years. 6.0.20 was released in summer 2009. Try again with Tomcat 6.0.37, which
has had a bunch of fixes in the meantime. If you can reproduce with 6.0.latest,
we can probably fix it.
While you're at it, please test against Tomcat 7.0.42. There are lots of
differences between Tomcat 6 and 7, but much less between Tomcat 7 and 8 (where
a fix is more likely to happen faster).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #4 from Christopher Schultz <ch...@christopherschultz.net> ---
Created attachment 30970
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30970&action=edit
Proposed patch
Can you run this through your tests?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> ---
This patch is against Tomcat 8 (trunk), but will likely apply cleanly to
earlier versions.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #3 from taly <ta...@yahoo.com> ---
Did a little more digging apparently this snippet of code was add to
javax.el.ArrayELResolver.setValue()
if (value != null &&
!base.getClass().getComponentType().isAssignableFrom(
value.getClass())) {
throw new ClassCastException(message(context,
"objectNotAssignable",
new Object[] {value.getClass().getName(),
base.getClass().getComponentType().getName()}));
}
isAssignableFrom() does not take into account autoboxing so therefore this
change is breaking setValue()
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
--- Comment #8 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Mark Thomas from comment #6)
> Note that the suggested patch was not used. The Util class already contained
> the necessary version of isAssignableFrom(). This was used instead. I also
> added a test case to confirm the fix.
Aw, I worked really hard on that ;)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays
of primitives
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691
taly <ta...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org