You made an application with JSF + Spring integration.
You deployed your application.
You got NullPointerException
when an injected object’s method is called.
How to fix that:
Add the following piece of XML in faces-config.xml
:
<application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> </application>
You’ll get the following warning:
Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver
Ignore it.
One Response to [Solved] Spring dependency injection not working
Leave a Reply
You must be logged in to post a comment.
Thank you very much for this article!!! I spent two days looking for the solution of this error.
Many thanks