jsf - org.apache.el.parser.ParseException: Encountered "(" at line X, column Y. Was expecting one of [...] -


the below jsf snippet:

<p:datatable value="#{userbean.getall()}" var="user"> 

throws exception:

encountered "(" @ line 1, column 18. expecting 1 of: "}" ... "." ... "[" ... ">" ... "gt" ... "<" ... "lt" ... ">=" ... "ge" ... "<=" ... "le" ... "==" ... "eq" ... "!=" ... "ne" ... "&&" ... "and" ... "||" ... "or" ... "*" ... "+" ... "-" ... "/" ... "div" ... "%" ... "mod" ...  org.apache.el.parser.parseexception: encountered "(" @ line 1, column 18. expecting 1 of:     "}" ...     "." ...     "[" ...     ">" ...     "gt" ...     "<" ...     "lt" ...     ">=" ...     "ge" ...     "<=" ...     "le" ...     "==" ...     "eq" ...     "!=" ...     "ne" ...     "&&" ...     "and" ...     "||" ...     "or" ...     "*" ...     "+" ...     "-" ...     "/" ...     "div" ...     "%" ...     "mod" ...      @ org.apache.el.parser.elparser.generateparseexception(elparser.java:2142)     @ org.apache.el.parser.elparser.jj_consume_token(elparser.java:2024)     @ org.apache.el.parser.elparser.deferredexpression(elparser.java:113)     @ org.apache.el.parser.elparser.compositeexpression(elparser.java:40)     @ org.apache.el.lang.expressionbuilder.createnodeinternal(expressionbuilder.java:93)     @ org.apache.el.lang.expressionbuilder.build(expressionbuilder.java:150)     @ org.apache.el.lang.expressionbuilder.createvalueexpression(expressionbuilder.java:194)     @ org.apache.el.expressionfactoryimpl.createvalueexpression(expressionfactoryimpl.java:68)     @ com.sun.faces.facelets.el.eltext$eltextvariable.apply(eltext.java:203)     @ com.sun.faces.facelets.compiler.attributeinstruction.apply(attributeinstruction.java:101)     @ com.sun.faces.facelets.compiler.uiinstructionhandler.apply(uiinstructionhandler.java:141)     @ javax.faces.view.facelets.compositefacelethandler.apply(compositefacelethandler.java:98)     @ javax.faces.view.facelets.delegatingmetataghandler.applynexthandler(delegatingmetataghandler.java:137)     @ com.sun.faces.facelets.tag.jsf.componenttaghandlerdelegateimpl.apply(componenttaghandlerdelegateimpl.java:196)     @ javax.faces.view.facelets.delegatingmetataghandler.apply(delegatingmetataghandler.java:120)     @ javax.faces.view.facelets.compositefacelethandler.apply(compositefacelethandler.java:98) 

how caused , how can solve it?

that can happen if environment doesn't support el 2.2. invoking direct methods parentheses/arguments this

value="#{userbean.getall()}"  

is supported since el 2.2, goes hand in hand servlet 3.0. if you're getting exception, can mean you're not deploying servlet 3.0 compatible container, or webapp's web.xml not declared conform servlet 3.0, or webapp's /web-inf/lib littered arbitrarily downloaded servletcontainer-specific jar files originating different servletcontainer make/version doesn't comply el 2.2.

there 2 solutions:

  1. use el 2.1 compatible syntax, works on servlet 2.5 compatible containers:

    value="#{userbean.all}"  
  2. upgrade servlet 3.0 compatible container (tomcat 7, glassfish 3, jboss 6, etc), or fix web.xml comply servlet 3.0.

you should make absolutely sure webapp's /web-inf/lib not contain any servletcontainer-specific libraries such el-api.jar , friends (see this related question).

please note not jsf problem @ all. got exception javax.el/org.apache.el package, not javax.faces/com.sun.faces package. means it's el problem. it's saying el syntax wrong. encountered ( didn't expect that. expected characters/operators listed thereafter.

see also:


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -