I have a JSF 2.1 web application developed using the mojarra 2.1.17 definition that works with any problems in the JBoss 6.1 container: now I need to change the application server and I need to use websphere AS 8.5 that were born with MyFaces JSF 2 from distribution kit. I am trying to deploy and run my webapp, ignoring MyFaces and using Mojarra, setting up my EAR, as the official IBM guide shows, setting up a shared lib with mojarra dist enabled, associates it with a new classloader created exclusively for my server1 WAS 8.5 instance. This does not work at all, and when I deploy my webapp, I get this glass when I try to start the application:
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: null at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994) at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862) Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: null at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:759) at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426) ... 14 more Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: null at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:176) at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749) ... 16 more Caused by: java.lang.NullPointerException at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:283) at com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:107) at com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:115) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409) at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169) ... 17 more
I was debugging the cleanupInitMaps () method of mojarra dist too, and I saw that it was trying to get two maps of the form of a variable from FacesContext called threadInitContext and initContextServletContext , but was getting null
Field threadMap = FacesContext.class.getDeclaredField("threadInitContext"); and Field initContextMap = FacesContext.class.getDeclaredField("initContextServletContext");
How is this caused and how can I solve it?
source share