Changing faces-config.xml from 2.2 to 2.3 causes javax.el.PropertyNotFoundException: Target Unreachable, identifier ‘bean’ resolved to null

I would like to post a complete solution, what should be done in order to make JSF 2.3 libs work in JSF v2.3 mode. Code samples below are based on GlassFish 5.0 server environment. 1) Upgrade JSF libs to the version 2.3.3 at least (it fixes some bugs related to jsf 2.3 mode activation) 2) … Read more

c:forEach throws javax.el.PropertyNotFoundException: Property ‘foo’ not found on type java.lang.String

Here, <c:forEach var=”statusHistory” items=”statusHistoryList”> You’re supplying the items attribute of <c:forEach> with a plain vanilla String with a value of “statusHistoryList” which in turn indeed doesn’t have a getTimestamp() method. You need to reference it using an EL expression ${…} instead. <c:forEach var=”statusHistory” items=”${statusHistoryList}”> ${statusHistory.timestamp} </c:forEach>

Outcommented Facelets code still invokes EL expressions like #{bean.action()} and causes javax.el.PropertyNotFoundException on #{bean.action}

Look closer at the stack trace. Here’s the relevant part: … org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) com.sun.faces.facelets.el.ELText$ELTextVariable.toString(ELText.java:217) com.sun.faces.facelets.el.ELText$ELTextComposite.toString(ELText.java:157) com.sun.faces.facelets.compiler.CommentInstruction.write(CommentInstruction.java:77) … It’s thus evaluating EL in a comment block (recognizable by CommentInstruction). A comment block is considered as template text. Facelets evaluates by default also EL #{} in template text. It’s like as if you’re writing <p>#{screenShotBean.takeScreenshot}</p> without any JSF … Read more

javax.el.PropertyNotFoundException: Property ‘foo’ not found on type com.example.Bean

javax.el.PropertyNotFoundException: Property ‘foo’ not found on type com.example.Bean This literally means that the mentioned class com.example.Bean doesn’t have a public (non-static!) getter method for the mentioned property foo. Note that the field itself is irrelevant here! The public getter method name must start with get, followed by the property name which is capitalized at only … Read more

Identifying and solving javax.el.PropertyNotFoundException: Target Unreachable

1. Target Unreachable, identifier ‘bean’ resolved to null This boils down to that the managed bean instance itself could not be found by exactly that identifier (managed bean name) in EL like so #{bean}. Identifying the cause can be broken down into three steps: a. Who’s managing the bean? b. What’s the (default) managed bean … Read more