Struts 2 JSP Taglib error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Struts 2 JSP Taglib error

ravirajmishra98@gmail.com
Hello,

I am facing the following problem

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.tiles.jsp.taglib.UseAttributeTag cannot be cast to javax.servlet.jsp.tagext.Tag
        at org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:120)
        at org.apache.jsp.mmr.jsp.templates.layout_005fadmin_005fwindow_jsp._jspService(layout_005fadmin_005fwindow_jsp.java:100)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:477)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
        at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265)
        at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228)
        at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57)
        at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47)
        at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259)
        at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397)
        at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238)
        at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103)
        at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126)
        at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161)
        at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208)
        at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:253)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:260)
        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:52)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:134)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:134)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:199)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:69)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:115)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:139)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:157)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:123)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:201)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.meritconinc.mmr.interceptor.MmrTrackingInterceptor.intercept(MmrTrackingInterceptor.java:95)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:134)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.meritconinc.mmr.interceptor.MmrInterceptor.intercept(MmrInterceptor.java:141)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at com.meritconinc.mmr.interceptor.RedirectMessageInterceptor.doIntercept(RedirectMessageInterceptor.java:56)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247)
        at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:53)
        at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:577)
        at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81)
        at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.meritconinc.mmr.filter.CharsetFilter.doFilter(CharsetFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Struts 2 JSP Taglib error

Yasser Zamani


On 10/24/2017 10:10 AM, [hidden email] wrote:
> java.lang.ClassCastException: org.apache.tiles.jsp.taglib.UseAttributeTag cannot be cast to javax.servlet.jsp.tagext.Tag

There are several possible things. Please search the web for "cannot be
cast to javax.servlet.jsp.tagext.Tag" then you find a lot about this.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Struts 2 JSP Taglib error

Christoph Nenning
In reply to this post by ravirajmishra98@gmail.com
Hi,

I have often seen this when application included something jsp-api.jar or
jee-api.jar (other filenames are possible). That means Serlvet-Container
as another jar containing javax.servlet.jsp.tagext.Tag then application
which causes that ClassCastException.


Regards,
Christoph



> From: "[hidden email]" <[hidden email]>
> To: <[hidden email]>,
> Date: 24.10.2017 12:53
> Subject: Struts 2 JSP Taglib error
>
> Hello,
>
> I am facing the following problem
>
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException:
> org.apache.tiles.jsp.taglib.UseAttributeTag cannot be cast to
> javax.servlet.jsp.tagext.Tag
>    at
org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:120)
>    at
>
org.apache.jsp.mmr.jsp.templates.layout_005fadmin_005fwindow_jsp._jspService
> (layout_005fadmin_005fwindow_jsp.java:100)
>    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>    at org.apache.jasper.servlet.JspServletWrapper.service
> (JspServletWrapper.java:432)
>    at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

>    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:305)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.apache.catalina.core.ApplicationDispatcher.invoke
> (ApplicationDispatcher.java:690)
>    at org.apache.catalina.core.ApplicationDispatcher.processRequest
> (ApplicationDispatcher.java:477)
>    at org.apache.catalina.core.ApplicationDispatcher.doForward
> (ApplicationDispatcher.java:402)
>    at org.apache.catalina.core.ApplicationDispatcher.forward
> (ApplicationDispatcher.java:329)
>    at org.apache.tiles.request.servlet.ServletRequest.forward
> (ServletRequest.java:265)
>    at org.apache.tiles.request.servlet.ServletRequest.doForward
> (ServletRequest.java:228)
>    at org.apache.tiles.request.AbstractClientRequest.dispatch
> (AbstractClientRequest.java:57)
>    at org.apache.tiles.request.render.DispatchRenderer.render
> (DispatchRenderer.java:47)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:259)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:397)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:238)
>    at org.apache.tiles.TilesContainerWrapper.render
> (TilesContainerWrapper.java:103)
>    at org.apache.tiles.impl.mgmt.CachingTilesContainer.render
> (CachingTilesContainer.java:126)
>    at org.apache.struts2.views.tiles.TilesResult.doExecute
> (TilesResult.java:161)
>    at org.apache.struts2.result.StrutsResultSupport.execute
> (StrutsResultSupport.java:208)
>    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult
> (DefaultActionInvocation.java:373)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:277)
>    at
> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept
> (DebuggingInterceptor.java:253)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept

> (DefaultWorkflowInterceptor.java:176)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept
> (ValidationInterceptor.java:260)
>    at
>
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept
> (AnnotationValidationInterceptor.java:52)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept

> (ConversionErrorInterceptor.java:139)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept

> (StaticParametersInterceptor.java:199)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.MultiselectInterceptor.intercept
> (MultiselectInterceptor.java:69)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept
> (DateTextFieldInterceptor.java:115)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept
> (CheckboxInterceptor.java:88)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept
> (FileUploadInterceptor.java:246)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept
> (ModelDrivenInterceptor.java:99)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept

> (ScopedModelDrivenInterceptor.java:139)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept
> (ChainingInterceptor.java:157)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept
> (PrepareInterceptor.java:174)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.I18nInterceptor.intercept
> (I18nInterceptor.java:123)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept
> (ServletConfigInterceptor.java:171)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept
> (AliasInterceptor.java:201)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept

> (ExceptionMappingInterceptor.java:193)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.meritconinc.mmr.interceptor.MmrTrackingInterceptor.intercept
> (MmrTrackingInterceptor.java:95)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept
> (CheckboxInterceptor.java:88)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at com.meritconinc.mmr.interceptor.MmrInterceptor.intercept
> (MmrInterceptor.java:141)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.meritconinc.mmr.interceptor.RedirectMessageInterceptor.doIntercept
> (RedirectMessageInterceptor.java:56)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.factory.StrutsActionProxy.execute
> (StrutsActionProxy.java:53)
>    at org.apache.struts2.dispatcher.Dispatcher.serviceAction
> (Dispatcher.java:577)
>    at org.apache.struts2.dispatcher.ExecuteOperations.executeAction
> (ExecuteOperations.java:81)
>    at
>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter

> (StrutsPrepareAndExecuteFilter.java:143)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter
> (ExceptionTranslationFilter.java:166)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter
> (AnonymousProcessingFilter.java:125)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter
> (RememberMeProcessingFilter.java:142)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter
> (HttpSessionContextIntegrationFilter.java:249)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at org.acegisecurity.util.FilterChainProxy.doFilter
> (FilterChainProxy.java:149)
>    at org.acegisecurity.util.FilterToBeanProxy.doFilter
> (FilterToBeanProxy.java:98)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.displaytag.filter.ResponseOverrideFilter.doFilter
> (ResponseOverrideFilter.java:125)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at
com.meritconinc.mmr.filter.CharsetFilter.doFilter(CharsetFilter.java:38)

>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:225)
>    at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:123)
>    at org.apache.catalina.authenticator.AuthenticatorBase.invoke
> (AuthenticatorBase.java:472)
>    at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:168)
>    at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:98)
>    at org.apache.catalina.valves.AccessLogValve.invoke
> (AccessLogValve.java:927)
>    at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:118)
>    at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:407)
>    at org.apache.coyote.http11.AbstractHttp11Processor.process
> (AbstractHttp11Processor.java:1001)
>    at org.apache.coyote.AbstractProtocol
> $AbstractConnectionHandler.process(AbstractProtocol.java:579)
>    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run
> (JIoEndpoint.java:312)
>    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>    at java.lang.Thread.run(Unknown Source)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

This Email was scanned by proofpoint
Reply | Threaded
Open this post in threaded view
|

Re: Struts 2 JSP Taglib error

Martin Gainty




________________________________
From: Christoph Nenning <[hidden email]>
Sent: Tuesday, October 24, 2017 7:40 AM
To: Struts Users Mailing List
Subject: Re: Struts 2 JSP Taglib error

Hi,

I have often seen this when application included something jsp-api.jar or
jee-api.jar (other filenames are possible). That means Serlvet-Container
as another jar containing javax.servlet.jsp.tagext.Tag then application
which causes that ClassCastException.

MG>your compile time jar was correct but runtime jar is incorrect

MG>TC suggests you place The servlet-version specific jsp-api.jar into "common" folder
https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html
Apache Tomcat 8 (8.0.47) - Class Loader HOW-TO<https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html>
tomcat.apache.org
As indicated in the diagram above, Tomcat creates the following class loaders as it is initialized: Bootstrap — This class loader contains the basic runtime classes ...



Regards,
Christoph



> From: "[hidden email]" <[hidden email]>
> To: <[hidden email]>,
> Date: 24.10.2017 12:53
> Subject: Struts 2 JSP Taglib error
>
> Hello,
>
> I am facing the following problem
>
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.ClassCastException:
> org.apache.tiles.jsp.taglib.UseAttributeTag cannot be cast to
> javax.servlet.jsp.tagext.Tag
>    at
org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:120)
>    at
>
org.apache.jsp.mmr.jsp.templates.layout_005fadmin_005fwindow_jsp._jspService
> (layout_005fadmin_005fwindow_jsp.java:100)
>    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>    at org.apache.jasper.servlet.JspServletWrapper.service
> (JspServletWrapper.java:432)
>    at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

>    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:305)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.apache.catalina.core.ApplicationDispatcher.invoke
> (ApplicationDispatcher.java:690)
>    at org.apache.catalina.core.ApplicationDispatcher.processRequest
> (ApplicationDispatcher.java:477)
>    at org.apache.catalina.core.ApplicationDispatcher.doForward
> (ApplicationDispatcher.java:402)
>    at org.apache.catalina.core.ApplicationDispatcher.forward
> (ApplicationDispatcher.java:329)
>    at org.apache.tiles.request.servlet.ServletRequest.forward
> (ServletRequest.java:265)
>    at org.apache.tiles.request.servlet.ServletRequest.doForward
> (ServletRequest.java:228)
>    at org.apache.tiles.request.AbstractClientRequest.dispatch
> (AbstractClientRequest.java:57)
>    at org.apache.tiles.request.render.DispatchRenderer.render
> (DispatchRenderer.java:47)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:259)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:397)
>    at org.apache.tiles.impl.BasicTilesContainer.render
> (BasicTilesContainer.java:238)
>    at org.apache.tiles.TilesContainerWrapper.render
> (TilesContainerWrapper.java:103)
>    at org.apache.tiles.impl.mgmt.CachingTilesContainer.render
> (CachingTilesContainer.java:126)
>    at org.apache.struts2.views.tiles.TilesResult.doExecute
> (TilesResult.java:161)
>    at org.apache.struts2.result.StrutsResultSupport.execute
> (StrutsResultSupport.java:208)
>    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult
> (DefaultActionInvocation.java:373)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:277)
>    at
> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept
> (DebuggingInterceptor.java:253)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept

> (DefaultWorkflowInterceptor.java:176)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept
> (ValidationInterceptor.java:260)
>    at
>
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept
> (AnnotationValidationInterceptor.java:52)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept

> (ConversionErrorInterceptor.java:139)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept

> (StaticParametersInterceptor.java:199)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.MultiselectInterceptor.intercept
> (MultiselectInterceptor.java:69)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept
> (DateTextFieldInterceptor.java:115)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept
> (CheckboxInterceptor.java:88)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept
> (FileUploadInterceptor.java:246)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept
> (ModelDrivenInterceptor.java:99)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept

> (ScopedModelDrivenInterceptor.java:139)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept
> (ChainingInterceptor.java:157)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept
> (PrepareInterceptor.java:174)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.I18nInterceptor.intercept
> (I18nInterceptor.java:123)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept
> (ServletConfigInterceptor.java:171)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept
> (AliasInterceptor.java:201)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
>
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept

> (ExceptionMappingInterceptor.java:193)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.meritconinc.mmr.interceptor.MmrTrackingInterceptor.intercept
> (MmrTrackingInterceptor.java:95)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept
> (CheckboxInterceptor.java:88)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept
> (ParametersInterceptor.java:134)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at com.meritconinc.mmr.interceptor.MmrInterceptor.intercept
> (MmrInterceptor.java:141)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at
> com.meritconinc.mmr.interceptor.RedirectMessageInterceptor.doIntercept
> (RedirectMessageInterceptor.java:56)
>    at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
> (MethodFilterInterceptor.java:98)
>    at com.opensymphony.xwork2.DefaultActionInvocation.invoke
> (DefaultActionInvocation.java:247)
>    at org.apache.struts2.factory.StrutsActionProxy.execute
> (StrutsActionProxy.java:53)
>    at org.apache.struts2.dispatcher.Dispatcher.serviceAction
> (Dispatcher.java:577)
>    at org.apache.struts2.dispatcher.ExecuteOperations.executeAction
> (ExecuteOperations.java:81)
>    at
>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter

> (StrutsPrepareAndExecuteFilter.java:143)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter
> (ExceptionTranslationFilter.java:166)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter
> (AnonymousProcessingFilter.java:125)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter
> (RememberMeProcessingFilter.java:142)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at
> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter
> (HttpSessionContextIntegrationFilter.java:249)
>    at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>    at org.acegisecurity.util.FilterChainProxy.doFilter
> (FilterChainProxy.java:149)
>    at org.acegisecurity.util.FilterToBeanProxy.doFilter
> (FilterToBeanProxy.java:98)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.displaytag.filter.ResponseOverrideFilter.doFilter
> (ResponseOverrideFilter.java:125)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at
com.meritconinc.mmr.filter.CharsetFilter.doFilter(CharsetFilter.java:38)

>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:243)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:210)
>    at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:225)
>    at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:123)
>    at org.apache.catalina.authenticator.AuthenticatorBase.invoke
> (AuthenticatorBase.java:472)
>    at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:168)
>    at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:98)
>    at org.apache.catalina.valves.AccessLogValve.invoke
> (AccessLogValve.java:927)
>    at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:118)
>    at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:407)
>    at org.apache.coyote.http11.AbstractHttp11Processor.process
> (AbstractHttp11Processor.java:1001)
>    at org.apache.coyote.AbstractProtocol
> $AbstractConnectionHandler.process(AbstractProtocol.java:579)
>    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run
> (JIoEndpoint.java:312)
>    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>    at java.lang.Thread.run(Unknown Source)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

This Email was scanned by proofpoint