You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Bryan <to...@cisco.com> on 2005/03/24 00:08:06 UTC
JasperException, JSP calling wrong overloaded method
I have a custom tag MessageTag that has an overloaded setValue method. It is
being used like this.
<title>
<fmt:message value="exception.title" />
</title>
Instead of calling the setValue(String v) method, the generated code for the
JSP is calling
_jspx_th_fmt_message_0.setValue(
(com.cisco.tims.utils.MessageBundle.Descriptor)
org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(
com.cisco.tims.utils.MessageBundle.Descriptor.class,
"value",
"exception.title")
);
The exception stacktrace starts like this
org.apache.jasper.JasperException: jsp.error.beans.property.conversion
at
org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)
at
org.apache.jsp.jsp.exception_jsp._jspx_meth_fmt_message_0(exception_jsp.java:329)
at org.apache.jsp.jsp.exception_jsp._jspService(exception_jsp.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
I would have expected the generated code to be
_jspx_th_fmt_message_0.setValue("exception.title")
Oddly, this code works fine on a Mac OSX machine and a Solaris machine. I'm
only seeing this error on my Thinkpad, which is running a customized RedHat
Enterprise Linux install. I've tried running with Tomcat 5.0.28 and 5.0.30.
I've also tried both IBM's and Sun's JDK 1.4.2. Same error with every
combination.
Are overloaded setters like this supported? If so, any pointers on where to
turn next to troubleshoot this problem? I've killed a day on it, and I'm out
of ideas. I'm hoping that I've just misconfigured something that's easy to
overlook in my Tomcat installation.
--
Tom Bryan
Test Information Systems > Central Engineering Services
Cisco Systems > USA > NC > RTP
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: JasperException, JSP calling wrong overloaded method
Posted by Tim Funk <fu...@joedog.org>.
You shouldn't overload settors which act as beans or you'll get this problem.
-Tim
Tom Bryan wrote:
> I have a custom tag MessageTag that has an overloaded setValue method. It is
> being used like this.
> <title>
> <fmt:message value="exception.title" />
> </title>
>
> Instead of calling the setValue(String v) method, the generated code for the
> JSP is calling
> _jspx_th_fmt_message_0.setValue(
> (com.cisco.tims.utils.MessageBundle.Descriptor)
> org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(
> com.cisco.tims.utils.MessageBundle.Descriptor.class,
> "value",
> "exception.title")
> );
>
> The exception stacktrace starts like this
> org.apache.jasper.JasperException: jsp.error.beans.property.conversion
> at
> org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)
> at
> org.apache.jsp.jsp.exception_jsp._jspx_meth_fmt_message_0(exception_jsp.java:329)
> at org.apache.jsp.jsp.exception_jsp._jspService(exception_jsp.java:132)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> I would have expected the generated code to be
> _jspx_th_fmt_message_0.setValue("exception.title")
>
> Oddly, this code works fine on a Mac OSX machine and a Solaris machine. I'm
> only seeing this error on my Thinkpad, which is running a customized RedHat
> Enterprise Linux install. I've tried running with Tomcat 5.0.28 and 5.0.30.
> I've also tried both IBM's and Sun's JDK 1.4.2. Same error with every
> combination.
>
> Are overloaded setters like this supported? If so, any pointers on where to
> turn next to troubleshoot this problem? I've killed a day on it, and I'm out
> of ideas. I'm hoping that I've just misconfigured something that's easy to
> overlook in my Tomcat installation.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org