> From: Paulo Vitor [mailto:foxpv...@gmail.com]
> Subject: Re: A problem with tomcat 6.0.18
> 
> the stack trace is:
> 
> java.lang.IllegalArgumentException: Cannot convert 20 of type class
> java.lang.Integer to class java.lang.Number
>       org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:252)
>       org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:265)
>       org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:353)

I've just looked through the code in ElSupport, and I'm mystified as to why 
much of it is there at all.  In particular, the method:
    static Number coerceToNumber(final Number number, final Class type)
doesn't appear to accomplish anything other than throw the exception that's 
causing this particular grief.  Since the object being tested is already known 
to be a subclass of java.lang.Number, converting it to another subclass of 
java.lang.Number seems to be a complete waste of time; the original object 
should suffice to fulfill the contract of the API.

I've e-mailed the OP a modified version of ElSupport; put the .class file in 
the proper subdirectory of Tomcat's lib directory, restart Tomcat, and see if 
that addresses the problem.

As pid pointed out, a simple test case would help if and when this patch is 
submitted for review.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to