jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28986] - ClassCastException in ImplicitObjects
Date Mon, 14 Jun 2004 17:30:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28986>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28986

ClassCastException in ImplicitObjects





------- Additional Comments From trond@aasan.org  2004-06-14 17:30 -------
Stacktrace

java.lang.ClassCastException
	org.apache.commons.el.ImplicitObjects.getImplicitObjects(ImplicitObjects.java:123)
	org.apache.commons.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:130)
	org.apache.jasper.runtime.PageContextImpl.resolveVariable(PageContextImpl.java:833)
	org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
	org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
	org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
	org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
	org.example.StoryTag.setStoryId(StoryTag.java:88)
	org.apache.jsp.edit.view_jspx._jspx_meth_model_story_0(view_jspx.java:263)
...
...

Offending method in StoryTag.java:

    public void setStoryId(String storyId) throws JspException {
	try {
	    Long value = (Long) pageContext.getExpressionEvaluator().evaluate(storyId,
Long.class, pageContext.getVariableResolver(), null);
	    this.storyId = value;
	} catch (ELException e) {
	    throw new JspException(e);
	}
    }

Clumsy coding (first attempt in trying to use EL in custom tags) :-)

This is a rather complex Struts application. I can't seem to create a simple
test case, but somewhere in the app the pageContext attribute
"org.apache.taglibs.standard.ImplicitObjects" is set to an instance of
org.apache.taglibs.standard.lang.jstl.ImplicitObjects and later retrieved (in
org.apache.commons.el.ImplicitObjects) as an
org.apache.commons.el.ImplicitObjects which causes the ClassCastException

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message