Hi,
We are facing random "java.lang.ClassCastException" after 5/6 hrs in Struts Select tag. If we restart Application server then this error not occur for next 5/6 hour. Again after 5/6 hours we are facing same error.
Currently we are restarting Production Application Servers after 5/6 hrs, which is not best practice.
We have open TAR with Oracle and they had given below settings on Application server (global-web-application.xml), still we are facing error.
Please find below details and Stack Trace
1: Oracle Response:
When a OracleJspRuntime.releaseTagHandler() is called for the parent tag, it is released into the wrong pool since the child tag pool is still current.Subsequent calls to OracleJspRuntime.getTagHandler() get incorrect information leading to ClassCastExceptions
From Oracle Application Server (global-web-application.xml)
<init-param><param-name>tags_reuse_default</param-name><param-value>compiletime</param-value></init-param>
2: Stack Trace:
08/05/14 22:42:44 EXCEPTION IN Quote Applicant.jsp
08/05/14 22:42:44 java.lang.ClassCastException
08/05/14 22:42:44 at _jsp._quickquote._Applicant._jspService(_Applicant.java:1255)
08/05/14 22:42:44 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
08/05/14 22:42:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
08/05/14 22:42:44 at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
08/05/14 22:42:44 at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
08/05/14 22:42:44 at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
08/05/14 22:42:44 at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
08/05/14 22:42:44 at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
08/05/14 22:42:44 at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
08/05/14 22:42:44 at _jsp._template._mainLayout._jspService(_mainLayout.java:93)
08/05/14 22:42:44 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
08/05/14 22:42:44 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
08/05/14 22:42:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
08/05/14 22:42:44 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
08/05/14 22:42:44 at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
08/05/14 22:42:44 at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
08/05/14 22:42:44 at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
08/05/14 22:42:44 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
08/05/14 22:42:44 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
08/05/14 22:42:44 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
08/05/14 22:42:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
08/05/14 22:42:44 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
08/05/14 22:42:44 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
08/05/14 22:42:44 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
08/05/14 22:42:44 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
08/05/14 22:42:44 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
08/05/14 22:42:44 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
08/05/14 22:42:44 at java.lang.Thread.run(Thread.java:534)
3: _Applicant.java (Compiled version of Applicant.jsp from Application Server)
Following is the piece of code at line 1255
_ojsp_s_out.write(__oracle_jsp_text[162]);
{
org.apache.struts.taglib.html.SelectTag __jsp_taghandler_65=(org.apache.struts.taglib.html.SelectTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.struts.taglib.html.SelectTag.class,"org.apache.struts.taglib.html.SelectTag indexed name property style styleClass size");
__jsp_taghandler_65.setParent(__jsp_taghandler_31);
__jsp_taghandler_65.setIndexed(true);
__jsp_taghandler_65.setName("driver");
__jsp_taghandler_65.setProperty("driverSex");
__jsp_taghandler_65.setStyle("width:150;");
__jsp_taghandler_65.setStyleClass("text");
__jsp_taghandler_65.setSize("1");
3: Following is the piece of code in we have used in Applicant.jsp
Applicant.jsp
<html:select style="width:150;" styleClass="text" name="driver" property="driverSex" size="1" indexed="true">
<html
ption value=""><bean:message key="QQ01.select"/> </html
ption>
<html
ption value="M"><bean:message key="QQ01.selectoption.male"/></html
ption>
<html
ption value="F"><bean:message key="QQ01.selectoption.female"/></html
ption>
</html:select>
4: We are using
I: Oracle Application Server 10g - 10.1.2.0.2
II: Oracle provides in built JDK version "1.4.2_06"
III: OS: Linux AS4
IV: Struts - 1.2.7
V: TAG libraries Version
struts-bean.tld:- 1.2
struts-template.tld:- 1.0
struts-html.tld:- 1.2
struts-tiles.tld:- 1.2
struts-nested.tld:- 1.2
struts-logic.tld:- 1.2
Kindly provide us solution to resolve java.lang.ClassCastException.
Thanks and Regards,
Kailas