Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

java - JSPG0122E: Unable to parse EL function in Websphere 8

I am moving a web application from Websphere 6.1 to Websphere 8, and I am encountering the following error in one of my JSP pages:

com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /jsp/myJsp.jsp: /jsp/myJsp.jsp(863,4) --> JSPG0122E: Unable to parse EL function ${not empty rowVo.operation.package}. at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateElFunction(ELValidator.java:500) at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:122) at com.ibm.ws.jsp.translator.visitor.validator.ELValidator.validateELExpression(ELValidator.java:149) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttribute(ValidateVisitor.java:1757) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateCustomTagAttributeValues(ValidateVisitor.java:1405) at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitCustomTagStart(ValidateVisitor.java:294) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:366) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:369) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:419) at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:234) at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:216) at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:127) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:254) at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:121)

The offending section in the JSP file looks like this:

<c:forEach var="rowVo"
  items="${searchResultContainer.searchResultRowsPage}"
  varStatus="opStatus">
    <c:if test="${not empty rowVo.operation.jobscopeDescription}">
        <td>${rowVo.operation.jobscopeDescription}</td>
    </c:if>
    <c:if test="${not empty rowVo.operation.package}">
        <td>${rowVo.operation.package}</td>
    </c:if>
</c:forEach>

What is really confusing me is that the exception is thrown from the third EL expression, when the second is almost identical.

Operation is a generated class:

public class Operation {

    //Other properties omitted

    @XmlElement(name = "package")
    protected List<Package> _package;
    protected List<String> jobscopeDescription;
    public List<Package> getPackage() {
        if (_package == null) {
            _package = new ArrayList<Package>();
        }
        return this._package;
    }    
    public List<String> getJobscopeDescription() {
        if (jobscopeDescription == null) {
            jobscopeDescription = new ArrayList<String>();
        }
        return this.jobscopeDescription;
    }
}

These files have not changed during the migration, and worked fine on WAS 6.1. Does anyone have a clue what is wrong here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The code responsible for checking for the use of reserved keywords as EL variable identifiers was enhanced in WebSphere Application Server v8.0 and beyond, making the checking more strict. The variable checking code not only checks for reserved EL keywords, but also Java reserved keywords.

See this article for more info: http://www-01.ibm.com/support/docview.wss?uid=swg21642419&myns=swgws&mynp=OCSSEQTP&mync=A


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...