Read more in the BEA Forums. It’s an open bug - CR 189815.
If you modify a struts-related class (Action, FormBean, etc) Weblogic
loads it with another classloader. Unfortunately, the RequestProcessor
that is stored in the ServletContext was loaded by the previous
classloader.
The end result is of course, a ClassCastException since ServletContext is loaded by a different class loader. Totally uncool, especially when a deadline’s looming. If you’re advanterous, feel free to patch ActionServlet by adding the following code snippet:
private RequestProcessor getProcessorForModule(ModuleConfig config) {String key = Globals.REQUEST_PROCESSOR_KEY
+ config.getPrefix();
// TODO: modified to fix weblogic classpath issue
Object proc = getServletContext().getAttribute(key);
return (proc instanceof RequestProcessor) ? (RequestProcessor) proc : null;
}
I chose a faster way - just deploy the project in a packaged archived (WAR or EAR).
Update: Here’s another wild thought - use Tomcat. Stub whatever that needs Weblogic.
