Hi,

I've just upgraded my local/development Tomcat to 8.5.10 and I've hit a
problem in Apache Wicket:

java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Class
at
org.apache.wicket.protocol.http.servlet.ErrorAttributes.of(ErrorAttributes.java:152)


line 152 is:
Class<? extends Throwable> type = (Class<? extends
Throwable>)request.getAttribute("javax.servlet.error.exception_type");

In a debugger I see that the value is the class name, not the class itself.

According to
http://download.oracle.com/otn-pub/jcp/servlet-3.0-fr-eval-oth-JSpec/servlet-3_0-final-spec.pdf,
p.10.9.1, table 10-1 the type of the value should be:

Request Attributes                      Type
javax.servlet.error.status_code java.lang.Integer
javax.servlet.error.exception_type java.lang.Class       <<< a Class
javax.servlet.error.message java.lang.String
javax.servlet.error.exception java.lang.Throwable
javax.servlet.error.request_uri java.lang.String
javax.servlet.error.servlet_name java.lang.String


I didn't see any change related to this between 8.5.8 and 8.5.10 so I'm not
sure whether this should be a stopper for the release of 8.5.10.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Reply via email to