0

This code works on WebSphere 7.0. On WebSphere 8.5.5.9 Liberty profile I get the following error.

I was able to capture the source code of the invoking JSP class .

My JSP is not process this request.

Application Error (people selection)

SRVE0777E: Exception thrown by application class 'com.ibm.ws.jsp23.translator.visitor.validator.ELValidatorExtImpl.validateElFunction:44' 

com.ibm.ws.jsp.translator.JspTranslationException: JSPG0122E: Unable to parse EL function ${class}.

at com.ibm.ws.jsp23.translator.visitor.validator.ELValidatorExtImpl.validateElFunction(ELValidatorExtImpl.java:44)
at [internal classes]
at com.ibm._jsp._myCalArea._jspx_meth_c_if_4(_myCalArea.java:1440)
at com.ibm._jsp._myCalArea._jspx_meth_c_if_3(_myCalArea.java:1820)
at com.ibm._jsp._myCalArea._jspService(_myCalArea.java:203)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
at [internal classes]
..
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
at [internal classes]

I checked the exact line number and this is what it looks like.

org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/JSP/myCalAreaPeople.jsp" + "?" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("defaultenddate", request.getCharacterEncoding()) + "=" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${defaultenddate}", 
java.lang.String.class, (PageContext)pageContext, _jspx_fnmap, false), request.getCharacterEncoding()), out, true);

Second similar exception .

Application Error (devices only selection)

SRVE0777E: Exception thrown by application class 'com.ibm.ws.jsp23.translator.visitor.validator.ELValidatorExtImpl.validateElFunction:44' 

com.ibm.ws.jsp.translator.JspTranslationException: JSPG0122E: Unable to parse EL function ${class}.

at com.ibm.ws.jsp23.translator.visitor.validator.ELValidatorExtImpl.validateElFunction(ELValidatorExtImpl.java:44)
at [internal classes]
at com.ibm._jsp._myCalArea._jspx_meth_c_if_9(_myCalArea.java:1739)
at com.ibm._jsp._myCalArea._jspx_meth_c_if_3(_myCalArea.java:1826)
at com.ibm._jsp._myCalArea._jspService(_myCalArea.java:203)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101)
at [internal classes]
..
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
at [internal classes]

I checked the JSP Java source code and this is the exact line number.

org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/JSP/myCalAreaDevice.jsp" + "?" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("defaultenddate", request.getCharacterEncoding()) + "=" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${defaultenddate}", 
java.lang.String.class, (PageContext)pageContext, _jspx_fnmap, false), request.getCharacterEncoding()), out, true);

Yet this Line number works correctly.

org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/JSP/myCalSchedule.jsp" + "?" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("defaultenddate", request.getCharacterEncoding()) + "=" + 
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${defaultenddate}", 
java.lang.String.class, (PageContext)pageContext, _jspx_fnmap, false), request.getCharacterEncoding()), out, true);

Any idea what is a miss in the above erroring out line numbers. The line that works is compiled in the Java source code almost identical to those that are failing so what is causing this error. I also referred to this link. JSPG0122E: Unable to parse EL function in Websphere 8

http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html?cm_mc_uid=16882298186014694766597&cm_mc_sid_50200000=1471550554#jls-3.9

Thanks DJ

Community
  • 1
  • 1
user2358826
  • 221
  • 1
  • 5
  • 17
  • As mentioned at http://stackoverflow.com/a/17754650/3864977, this error suggests that "class" is being used as an EL identifier, which isn't allowed. Can you provide any of the relevant JSP source? – wtlucy Aug 18 '16 at 21:01
  • I updated to add the relevant JSP source code. – user2358826 Aug 18 '16 at 21:45
  • 1
    You can't use Java based literals/keywords like `class` (`instanceof`, `new`, `return`, etc) in EL. Rename `${class}` to something else. That it worked in older servers is actually a bug in the server itself. – BalusC Aug 18 '16 at 21:51
  • But I searched whole jsp for ${class} it doesnt exist – user2358826 Aug 18 '16 at 22:17
  • @BalusC .. If you flag this as duplicate an exact duplicate. You have to give the solution and not just flag it . I think you need to read that question in the link it ask of instanceOf and TomCat how is this a duplicate ? – user2358826 Aug 18 '16 at 22:28
  • The question may not be the same, but the answer is the same. It doesn't make sense to copypaste answers. Duplicates is not about questions, but about answers. Different questions may boil down to essentially the same answer :) – BalusC Aug 19 '16 at 06:27

0 Answers0