This particular ELException is a shell exception. This is usually done only when the getter method is called, which throws an exception. Something like the following happens under the covers when this ELException was thrown:
Object bean; String property; Method getter; // ... try { getter.invoke(bean); } catch (Exception e) { String message = String.format("Error reading '%s' on type %s", property, bean.getClass().getName()); throw new ELException(message, e); }
You should look further into stacktrace for a real underlying reason. Full stacktrace is usually only available in server logs. The real root cause is the lowest stacktrace exception. For example. the bottom one is caused by a NullPointerException thrown into the getter method.
javax.el.ELException: Error reading 'currentlocation' on type **.person.Person at ... at ... at ... Caused by: java.lang.NullPointerException at **.person.Person.getCurrentlocation(Person.java:42) at ... at ...
Information about the real root cause (exception type and line number) should give you enough information to solve the problem.
Again, this is not a problem with EL in general. This is just your own code that caused the problem.
Balusc
source share