Reputation: 11
I have a JSF 1.1 app which was working fine in WAS 6.0 and needs to be migrated to WAS 7.0, but it results in the following exception, even though I have set parent_last
in deployment.xml
:
Uncaught init() exception created by servlet Faces Servlet in application:
java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)**
How is this caused and how can I solve it?
Upvotes: 1
Views: 999
Reputation: 1108577
You will get this exception in JSF 1.1 when the application factory cannot be found. This has in turn among others the possible cause that the ConfigureListener
hasn't run for some reason. This is normally automatically invoked based on the .tld
file in the JSF library. You can always try to force the webapp to run it by adding the following entry to webapp's web.xml
:
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
However, I don't guarantee that it will fix the problem altogether. You may get a different exception now which needs to be investigated and fixed separately.
WAS 7.0 ships with JSF 1.2 bundled and (well-designed) JSF 1.1 code is technically 100% compatible with JSF 1.2, so I'd rather recommend to just get rid of the JSF 1.1 libraries in your webapp and change the faces-config.xml
to a JSF 1.2 compatible one.
Upvotes: 1