Can anyone explain me why I am getting the following exception:
java.lang.ClassCastException: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to com.evermind[Oracle Containers
for J2EE 10g (10.1.3.5.0) ].server.http.EvermindHttpServletRequest
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.NotFoundServlet.sendNotFound(NotFoundServlet.java:26
)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.NotFoundServlet.service(NotFoundServlet.java:18)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java
:64)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java
:15)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
I get it when I suppose to have NOT_FOUND page and my request url ends on .[some_ext] like .htm, .blah. But when request is without .[some_ext] (like _http:/domain/part1/part2/nosuchurl) then everything is ok and I get normal NOT_FOUND page mapped in the struts config:
<default-action-ref name="nopagefound"/>
<action name="nopagefound">
<result>/WEB-INF/jsp/errors/notfound.jsp</result>
</action>
I use Struts2(2.3.1.2)+Spring deployed on oc4j 10.1.3.5.0.
Here is my struts mapping:
<filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
And in Struts.properties
struts.action.extension= ,