IBM Support

InvocationTargetException when rendering a JSP *|* -FA471664A2A69DB4852575C20052F2BD- *|*

Question & Answer


Question

InvocationTargetException when rendering a JSP *|* -FA471664A2A69DB4852575C20052F2BD- *|*

Answer

Technote (troubleshooting)


Problem(Abstract)

Accessing a page on the WebSphere Commerce storefront results in a java.lang.reflect.InvocationTargetException and the JSP file is not rendered correctly.

Symptom

The SystemOut.log at the time of the exception displays content similar to the following snippet:

[1/19/09 14:41:22:877 PST] 00000045 WebApp E SRVE0026E: [Servlet Error]-[JSPG0227E: Exception caught while translating /ConsumerDirectStorefrontAssetStore/ShoppingArea/CatalogSection/CategorySubsection/TopCategoriesDisplay.jsp:
java.lang.reflect.InvocationTargetException

]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /ConsumerDirectStorefrontAssetStore/ShoppingArea/CatalogSection/CategorySubsection/TopCategoriesDisplay.jsp:

java.lang.reflect.InvocationTargetException


at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:133)

at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:169)

at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:82)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp(JSPExtensionServletWrapper.java:386)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper._checkForTranslation(JSPExtensionServletWrapper.java:355)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.checkForTranslation(JSPExtensionServletWrapper.java:263)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:150)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:254)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:334)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.ibm.commerce.struts.ECActionServlet.processRequest(ECActionServlet.java:249)

at com.ibm.commerce.struts.ECActionServlet.doGet(ECActionServlet.java:179)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:255)

at com.ibm.ws.cache.servlet.CacheHook.handleCacheMiss(CacheHook.java:669)

..

[1/19/09 14:41:23:051 PST] 00000045 WebApp E SRVE0026E: [Servlet Error]-[JSPG0227E: Exception caught while translating /error.jsp:

java.lang.reflect.InvocationTargetException

]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /error.jsp:

java.lang.reflect.InvocationTargetException


at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:133)

at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:169)

at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:82)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.translateJsp(JSPExtensionServletWrapper.java:386)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper._checkForTranslation(JSPExtensionServletWrapper.java:355)

at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.checkForTranslation(JSPExtensionServletWrapper.java:263)

..

[1/19/09 14:41:23:052 PST] 00000045 WebApp A SRVE0180I: [Stores] [/webapp/wcs/stores] [Servlet.LOG]: Error page exception The server cannot use the error page specified for your application because of the exception printed below.

..

[1/19/09 14:41:23:053 PST] 00000045 WebApp A SRVE0181I: [Stores] [/webapp/wcs/stores] [Servlet.LOG]: Error Page Exception: : com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0227E: Exception caught while translating /error.jsp:

java.lang.reflect.InvocationTargetException




Cause

Although there might be many causes of an InvocationTargetException it can occur if there are insufficient privileges for the non-root WebSphere Commerce user (who has started the WebSphere Commerce server) to compile the JSP files.


This error might occur if the WebSphere Commerce user cannot compile JSP files into the WAS profile temporary directory or if there are already previously compiled JSP files owned by another user.


Resolving the problem

Ensure that the <WAS_install>/temp and <WAS_profile>/temp directories have sufficient read and write privileges for the non-root user. Also ensure there are no JSP files which were compiled by another user in the directory.


This error might occur if the server was started as root user and JSP files were compiled as root and then the server is started as the non-admin user. Ensure in this case that the JSP files and temp directory are not owned by root but rather the non-root user.

Clearing of all the compiled JSP files in the temp directory might also be necessary.
Running the <WC_installdir>/bin/wcnonroot.sh as root should correct the problem or manually fix the permissions.


[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SS73G6","label":"Sterling Total Payments for Financial Services"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
13 October 2021

UID

ibm10771659