javax.faces.FacesException: Expression Error: Named Object: net.bootsfaces.layout.Well not found

南楼画角 提交于 2019-12-02 12:24:33

问题


I am trying to test a JSF 2.2 project with BootsFaces 0.7. The project is running like a charm on GlassFish 3 and PrimeFaces 5.2. But on the page where any tag is used from the BootsFaces libraray, like <b:well>, I get the following exception:

javax.faces.FacesException: Expression Error: Named Object: net.bootsfaces.layout.Well not found

How is this caused and how can I solve it?


回答1:


Thanks to this answer , I finally found the solution to my issue: I had to put the boots faces jar file in the /WEB-INF/lib directory. I will never get tired of saying it: Many thanks BalusC




回答2:


Update Oct 05, 2015: If you happen to use Spring Boot and Mojarra, go back to Mojarra 2.2.10. The newer versions are broken, and they will remain broken until the Spring Boot ticket https://github.com/spring-projects/spring-boot/issues/3216 is resolved. Alternatively, you may try Apache MyFaces, as described in http://www.beyondjava.net/blog/newsflash-running-example-of-spring-boot-jsf/.

The error message means the the class net.bootsfaces.layout.Well cannot be created. You didn't give the rest of the stack trace, but most likely the error is raised in a method called newThing(). This is weird, because JSF already figured out that b:well is implemented by net.bootsfaces.layout.Well. In other words: JSF managed to read the configuration file, but fails to create the object. My best guess is there's something wrong with your classpath, or that you've got a corrupt BootsFaces.jar.

I suggest you try to execute the line new net.bootsfaces.layout.Well() for a test. If my theory is correct, it should result in a ClassNotFoundException.

Another possibility is your runtime environment. Do you use Spring Boot? This theory has been uttered by a brazilian developer. Maybe this causes the error.

In the meantime, there are two tickets on our bug tracker: https://github.com/TheCoder4eu/BootsFaces-OSP/issues/188 and https://github.com/TheCoder4eu/BootsFaces-OSP/issues/189.



来源:https://stackoverflow.com/questions/32799225/javax-faces-facesexception-expression-error-named-object-net-bootsfaces-layou

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!