'JSF ajax call giving error within openfacess library - JBoss 7.4 and Java 11

I'm deploying a web application(war file) to JBoss 7.4 server environment.

JBoss EAP 7.4.0.GA (WildFly Core 15.0.2.Final-redhat-00001) starting

Java Version

 java.home = /usr/lib/jvm/java-11-openjdk-11.0.14.0.9-1.el7_9.x86_64

This web application uses Mojarra 2.3.14 + Richfaces 4.5.4 + Openfaces 3.0 libraries for some of the UI screens.

The application was running fine on JBoss 7.1/Java 8. After upgrading to JBoss 7.4/Java 11 any Ajax call on UI screen is giving below error in server log file. There were no change to JSF related libraries.

The below error is from Openfaces 3.0 library.

2022-Feb-16 19:02:51,591 []  INFO io.undertow.servlet:371 - BEFORE RESTORE_VIEW 1
2022-Feb-16 19:02:51,625 []  INFO io.undertow.servlet:371 - AFTER RESTORE_VIEW 1
2022-Feb-16 19:02:51,625 []  INFO io.undertow.servlet:371 - BEFORE APPLY_REQUEST_VALUES 2
2022-Feb-16 19:02:51,628 []  INFO io.undertow.servlet:371 - AFTER APPLY_REQUEST_VALUES 2
2022-Feb-16 19:02:51,628 []  INFO io.undertow.servlet:371 - BEFORE PROCESS_VALIDATIONS 3
2022-Feb-16 19:02:51,630 []  INFO io.undertow.servlet:371 - AFTER PROCESS_VALIDATIONS 3
2022-Feb-16 19:02:51,630 []  INFO io.undertow.servlet:371 - BEFORE UPDATE_MODEL_VALUES 4
2022-Feb-16 19:02:51,631 []  INFO io.undertow.servlet:371 - AFTER UPDATE_MODEL_VALUES 4
2022-Feb-16 19:02:51,631 []  INFO io.undertow.servlet:371 - BEFORE INVOKE_APPLICATION 5
2022-Feb-16 19:02:51,631 []  INFO io.undertow.servlet:371 - AFTER INVOKE_APPLICATION 5
2022-Feb-16 19:02:51,631 []  INFO io.undertow.servlet:371 - BEFORE RENDER_RESPONSE 6
2022-Feb-16 19:02:51,642 [] SEVERE webcontainer.jsf.application:1164 - Error Rendering View[/jsf/page/ps/overallportal/portal_configuration.xhtml]: java.lang.NullPointerException
    at deployment.expert3.war//org.openfaces.application.OpenFacesResourceHandler.isExternalResource(OpenFacesResourceHandler.java:96)
    at deployment.expert3.war//org.openfaces.application.OpenFacesResourceHandler.getRendererTypeForResourceName(OpenFacesResourceHandler.java:78)
    at [email protected]//com.sun.faces.context.PartialViewContextImpl.renderComponentResources(PartialViewContextImpl.java:482)
    at [email protected]//com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:314)
    at deployment.expert3.war//org.richfaces.context.ExtendedPartialViewContext.processPartial(ExtendedPartialViewContext.java:263)
    at [email protected]//javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:228)
    at deployment.expert3.war//org.openfaces.ajax.PartialViewContext.processPartial(PartialViewContext.java:131)
    at [email protected]//javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1102)
    at [email protected]//javax.faces.component.UIComponent.encodeAll(UIComponent.java:1647)
    at [email protected]//com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:442)
    at [email protected]//com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)
    at [email protected]//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
    at [email protected]//javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)

This same web application works without issues JBoss 7.1 and Java 8. Anyone idea why we are getting above error ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source