Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3956 | minor | always | 03-19-10 19:19 | 03-22-10 12:51 | |
|
|||||
Reporter: | rmann | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.5 | ||
|
|||||
Summary: | 0003956: resin incorrectly builds JSP tag classes | ||||
Description: |
I have a JSP tag that invokes the fmt:formatNumber tag. When resin generates the Java for this tag, it attempts to set my tag's instance as the parent of the format number instance. To do this, it attempts to cast it to a javax.servlet.jsp.tagext.Tag. Unfortunately, the class my tag inherits is com.caucho.jsp.java.JspTagSupport, which inherits ultimately JspTag, not Tag, which is what it's trying to cast to. I've enclosed the generated Java. The offending line is 0000213. As near as I can tell, my tag's inheritance chain is: _jsp._WEB_22dINF._tags._lz._durT__tag extends com.caucho.jsp.java.JspTagSupport extends com.caucho.jsp.java.JspTagSupport extends javax.servlet.jsp.tagext.SimpleTagSupport (extends java.lang.Object, implements javax.servlet.jsp.tagext.SimpleTag) javax.servlet.jsp.tagext.SimpleTag extends javax.servlet.jsp.tagext.JspTag extends nothing. And it's calling com.caucho.jstl.rt.FormatNumberTag.setParent(), which is really javax.servlet.jsp.tagext.BodyTagSupport.setParent(), which is really javax.servlet.jsp.tagext.TagSupport.setParent(javax.servlet.jsp.tagext.Tag). javax.servlet.jsp.tagext.Tag inherits from javax.servlet.jsp.tagext.JspTag So, while they both have a common parent interface in JspTag, the case is from one branch to another under that. |
||||
Steps To Reproduce: | |||||
Additional Information: |
Stack trace of the exception: [03-19 18:44:38.037] {http://*:80-6} [^] WARNING (com.caucho.server.webapp.ErrorPageManager) javax.servlet.ServletException: javax.servlet.ServletException: com.caucho.jsp.QJspException: java.lang.ClassCastException: _jsp._WEB_22dINF._tags._lz._durT__tag cannot be cast to javax.servlet.jsp.tagext.Tag [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) [03-19 18:44:38.037] {http://*:80-6} [^] at javax.servlet.http.HttpServlet.service(HttpServlet.java:119) [03-19 18:44:38.037] {http://*:80-6} [^] at javax.servlet.http.HttpServlet.service(HttpServlet.java:96) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) [03-19 18:44:38.037] {http://*:80-6} [^] at com.latencyzero.satdb.RequestFilter.doFilter(RequestFilter.java:124) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) [03-19 18:44:38.037] {http://*:80-6} [^] at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) [03-19 18:44:38.037] {http://*:80-6} [^] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) [03-19 18:44:38.037] {http://*:80-6} [^] at com.latencyzero.satdb.SecurityFilter.doFilter(SecurityFilter.java:215) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:780) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection.dispatchRequest(TcpConnection.java:600) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection.handleRequestsImpl(TcpConnection.java:566) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection.handleRequests(TcpConnection.java:519) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection$AcceptTask.doTask(TcpConnection.java:1100) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(TcpConnection.java:1037) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.connection.TcpConnection$AcceptTask.run(TcpConnection.java:1068) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866) [03-19 18:44:38.037] {http://*:80-6} [^] Caused by: javax.servlet.ServletException: com.caucho.jsp.QJspException: java.lang.ClassCastException: _jsp._WEB_22dINF._tags._lz._durT__tag cannot be cast to javax.servlet.jsp.tagext.Tag [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java:1255) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._jsp._mission__jsp._jspService(_mission__jsp.java:30) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.jsp.JavaPage.service(JavaPage.java:61) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.jsp.Page.pageservice(Page.java:535) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:283) [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:121) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [03-19 18:44:38.037] {http://*:80-6} [^] at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) [03-19 18:44:38.037] {http://*:80-6} [^] ... 24 more [03-19 18:44:38.037] {http://*:80-6} [^] Caused by: com.caucho.jsp.QJspException: java.lang.ClassCastException: _jsp._WEB_22dINF._tags._lz._durT__tag cannot be cast to javax.servlet.jsp.tagext.Tag [03-19 18:44:38.037] {http://*:80-6} [^] at com.caucho.jsp.QJspException.createJspException(QJspException.java:74) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._tags._lz._durT__tag.doTag(_durT__tag.java:39) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._jsp._mission__jsp._jspService(_mission__jsp.java:194) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._jsp._mission__jsp._jspService(_mission__jsp.java:28) [03-19 18:44:38.037] {http://*:80-6} [^] ... 38 more [03-19 18:44:38.037] {http://*:80-6} [^] Caused by: java.lang.ClassCastException: _jsp._WEB_22dINF._tags._lz._durT__tag cannot be cast to javax.servlet.jsp.tagext.Tag [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._tags._lz._durT__tag$TagState.get_jsp_FormatNumberTag_0(_durT__tag.java:213) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._tags._lz._durT__tag.doTag(_durT__tag.java:90) [03-19 18:44:38.037] {http://*:80-6} [^] at _jsp._WEB_22dINF._tags._lz._durT__tag.doTag(_durT__tag.java:35) [03-19 18:44:38.037] {http://*:80-6} [^] ... 40 more |
||||
Relationships | |||||
Attached Files: | tagcast.zip [^] (4,147 bytes) 03-19-10 19:19 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|