Friday, July 27, 2012

OracleJSP: oracle.jsp.provider.JspCompileException

Work with OC4J and seen this?

500 Internal Server Error

OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:\product\\OracleAS_1\j2ee\home\application-deployments\TOLTAT\TOLTAT-webapp\persistence_pages

Line # Error

cannot access HttpServletRequest bad class file: .\HttpServletRequest.class class file contains wrong class: javax.servlet.http.HttpServletRequest Please remove or make sure it appears in the correct subdirectory of the classpath. public void _jspService(HttpServletRequest request, HttpServletResponse response) throws, ServletException {

(Click to expand.)

The fix is depressingly simple. Delete all the .class files from $ORACLE_HOME/j2ee/home/*.class. You don't need to bounce the server after this.