You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bhattacharya, Mousami" <mb...@nsf.gov> on 2008/04/07 16:57:45 UTC

Struts 1.1 final/weblogic 9.2 java.lang.ClassCastException: org.apache.struts.upload.MultipartRequestWrapper

Hi,
I am getting this ClassCastException in
org.apache.struts.upload.MultipartRequestWrapper . I have debugged the
code and it looks like the error is coming in
org.apache.struts.tiles.UrlController.
UrlController's perform method has these lines of code. The exception is
happening at rd.include(...
On checking the previous archives, I found this was a bug in struts 1.1
but had been fixed in the final releases , but the fix was in the
RequestProcessor class. 

   RequestDispatcher rd = servletContext.getRequestDispatcher( url );
   if( rd == null )
     throw new ServletException( "Controller can't find url '" + url +
"'." );

   rd.include( request, response );

Please help. Thanks.

Exception stack Trace
java.lang.ClassCastException:
org.apache.struts.upload.MultipartRequestWrapper
	at
weblogic.servlet.internal.ServletRequestImpl.getOriginalRequest(ServletR
equestImpl.java:1316)
	at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatche
rImpl.java:345)
	at
org.apache.struts.tiles.UrlController.perform(UrlController.java:111)
	at
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(Til
esRequestProcessor.java:243)
	at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles
RequestProcessor.java:309)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
279)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)