0

I am migrating an application (JSF 2.0/openJPA/primeFaces, EJB 3.0 & JPA 2.0) from WAS v7 to Liberty 8.5.5.9.The application has been deployed and started successfully however I am getting context initialization failure error while opening the page. The error detail is given below. Could anyone help me to resolve the issue? Thanks in advance. I further add the ffdc log that is created whenever I am trying to open any page. It shows it's caused by java.lang.NullPointerException. I have changed the static initialization block with @PostConstruct & public void init(). So now I am not getting this error. But now I am facing a different NPE from filter that is added below at rhe end. Could you please have a look?

----------------------------------------------------------------------------
CONSOLE LOG
----------------------------------------------------------------------------

    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/rest/*, wrapper-->ServletWrapper[RESTService:[/rest/*]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/abb_view.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/abb_details.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/gda_framework_view.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/gda_overview.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/gda_sbb_table_view.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/primary_abb_details.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/secondary_abb_details.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/sbb_details.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/abb/sbb_integration_considerations.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/general_view/doc_type_models/doc_view_type.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/general_view/doc_type_models/document_type.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/view_client_first.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/about_playbook_1.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/about_playbook_2.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/about_playbook.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/view_service_line.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/domain_views/organization/view_service_line_component.xhtml, wrapper-->ServletWrapper[GSARRedirect:[/gsar/abb/abb_view.xhtml, /gsar/abb/abb_details.xhtml, /gsar/abb/gda_framework_view.xhtml, /gsar/abb/gda_overview.xhtml, /gsar/abb/gda_sbb_table_view.xhtml, /gsar/abb/primary_abb_details.xhtml, /gsar/abb/secondary_abb_details.xhtml, /gsar/abb/sbb_details.xhtml, /gsar/abb/sbb_integration_considerations.xhtml, /gsar/general_view/doc_type_models/doc_view_type.xhtml, /gsar/general_view/doc_type_models/document_type.xhtml, /gsar/domain_views/organization/view_client_first.xhtml, /gsar/domain_views/organization/about_playbook_1.xhtml, /gsar/domain_views/organization/about_playbook_2.xhtml, /gsar/domain_views/organization/about_playbook.xhtml, /gsar/domain_views/organization/view_service_line.xhtml, /gsar/domain_views/organization/view_service_line_component.xhtml]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/imageServlet/*, wrapper-->ServletWrapper[ImageServlet:[/imageServlet/*]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/*, wrapper-->ServletWrapper[Faces Servlet:[*.xhtml, /gsar/*]], application-->GSAR-WebEAR.
    [WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/gsar/login/login_check, wrapper-->ServletWrapper[GSARLogin:[/gsar/login/login_check]], application-->GSAR-WebEAR.
    [WARNING ] More than one managed bean w/ the name of 'solutionPopupCodePageController' - only keeping the last 
    [ERROR   ] SRVE0283E: Exception caught while initializing context: java.lang.NoClassDefFoundError: com.ibm.gsar.bean.SiteNavBean (initialization failure)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:181)
        at java.lang.J9VMInternals.newInstanceImpl(Native Method)
        at java.lang.Class.newInstance(Class.java:1505)
        at com.ibm.ws.jsf.config.annotation.WebSphereAnnotationLifecycleProvider.newInstance(WebSphereAnnotationLifecycleProvider.java:63)
        at [internal classes]

    [ERROR   ] SRVE0315E: An exception occurred: java.lang.Throwable: java.lang.NullPointerException
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4913)
        at [internal classes]
    Caused by: java.lang.NullPointerException
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
        ... 1 more

    [ERROR   ] SRVE0095I: Servlet has become temporarily unavailable for service: /services/gsar/gsar.xhtml

----------------------------------------------------------------------------
**FDDC.LOG**
----------------------------------------------------------------------------

Exception = java.lang.ExceptionInInitializerError
Source = com.ibm.ws.webcontainer.osgi.DynamicVirtualHost
probeid = startWebApp
Stack Dump = java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:263)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:208)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Class.java:176)
    at com.ibm.ws.webcontainer.osgi.webapp.WebApp.addClassToHandlesTypesStartupSet(WebApp.java:1096)
    at com.ibm.ws.webcontainer.osgi.webapp.WebApp.scanForHandlesTypesClasses(WebApp.java:959)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2473)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1038)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6463)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:446)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:248)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:313)
    at com.ibm.ws.http.internal.VirtualHostImpl.discriminate(VirtualHostImpl.java:251)
    at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:306)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    at java.lang.Thread.run(Thread.java:780)
Caused by: java.lang.NullPointerException
    at pagecode.PageCodeBase.<clinit>(PageCodeBase.java:42)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:241)
    ... 26 more

---------------------------------------------------------------------------------
CONSOLE LOG - Filter Error
---------------------------------------------------------------------------------

 Error Page Exception
 SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.

 Original Exception:
 Error Message: java.lang.NullPointerException
 Error Code: 500
 Target Servlet: Faces Servlet
 Error Stack:
 java.lang.NullPointerException
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:385)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:985)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1143)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928)
      at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
      at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
      at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
      at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
      at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
      at java.lang.Thread.run(Thread.java:780)



 Error Page Exception:
 Error Message: java.lang.NullPointerException
 Error Code: 0
 Target Servlet:
 Error Stack:
 java.lang.NullPointerException
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:385)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:988)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1143)
      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1378)
      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:186)
      at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:4212)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleException(WebApp.java:4944)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:97)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928)
      at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
      at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
      at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285)
      at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256)
      at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
      at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
      at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
      at java.lang.Thread.run(Thread.java:780)
  • Please reformat your post. Unreadable this way. And how is this PrimeFaces related? – Kukeltje Jun 19 '16 at 19:35
  • @Kukeltje reformat done, hope you can find something out now. – Fabian N. Jun 19 '16 at 19:40
  • `[ERROR ] SRVE0283E: Exception caught while initializing context: java.lang.NoClassDefFoundError: com.ibm.gsar.bean.SiteNavBean (initialization failure)` – Kukeltje Jun 19 '16 at 19:41
  • @FabianN.@Kukultje Do you have any suggestion for the error I am getting? – Subrata Aich Jun 20 '16 at 16:03
  • as @Kukeltje already wrote: It looks like your app can't find the `com.ibm.gsar.bean.SiteNavBean` class, take a look at the src code where the class is required and where it should be and if its there... – Fabian N. Jun 20 '16 at 16:06
  • @FabianN.@Kukultje : WebContent\WEB-INF\classes\com\ibm\gsar\bean\SiteNavBean.class exists. – Subrata Aich Jun 21 '16 at 07:30
  • The "(initialization failure)" means that the class was found, but it contains a `static {}` (or `static ... = ...`) that threw an exception. I would expect a "Caused by" to be present in some log that explains the reason. You might check messages.log; perhaps it was filtered out of console.log for some reason. – Brett Kail Jun 23 '16 at 02:45
  • @Brett: Thanks for your reply. There is a "Caused by" as given below. – Subrata Aich Jun 23 '16 at 11:44
  • @Brett: Thanks for your reply. There is a "Caused by" as shown above in the error log. Please have a look. – Subrata Aich Jun 23 '16 at 11:48
  • @Subrata We need to see the "Caused by" of the NoClassDefFoundError, not the NullPointerException. Please look for it in messages.log or earlier in console.log. (The NullPointerException looks like a product issue that should be reported to IBM.) – Brett Kail Jun 23 '16 at 12:33
  • @Brett: I have pasted the ffdc log above which shows that it's caused by java.lang.NullPointerException. Please have a look suggest me. – Subrata Aich Jun 24 '16 at 18:20
  • @Subrata pagecode.PageCodeBase is presumably your code, so you need to diagnose what went wrong on line 42. This question has effectively devolved into a duplicate of [What is a NullPointerException, and how do I fix it?](http://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it). – Brett Kail Jun 24 '16 at 19:13
  • @Brett : Yes, pagecode.PageCodeBase is my code & line no 42 is for initializing the ExternalContext from the FacesContext as given below. What could be the reasons for initatialization failue of FacesContext? `public abstract class PageCodeBase { public static String contextPath = null; static { FacesContext fc = FacesContext.getCurrentInstance(); ExternalContext ec = fc.getExternalContext(); //Line no. 42 HttpServletRequest req = (HttpServletRequest)ec.getRequest(); if(req != null) { contextPath = req.getContextPath(); } }......` – Subrata Aich Jun 25 '16 at 06:33

1 Answers1

1

FacesContext.getCurrentInstance() has returned null. It is somewhat questionable that WebSphere Application Server is initializing your class in this context (likely using 1-arg Class.forName rather than 3-arg no-init Class.forName or ClassLoader.loadClass), but it is extremely fragile for you to try to access the JSF context from a static initializer. My recommendation would be to use a ServletContextListener to obtain ServletContext.getContextPath rather than hoping your class is initialized in the right context.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90
  • I have changed the "static {" by "@PostConstruct public void init()" and I am no more getting error out here. But now I am getting further NPE error due to Filter as shown above. Please have a look. – Subrata Aich Jun 28 '16 at 13:07
  • 1
    @Subrata That is an internal error in the product, so you'll need to report that to IBM. (In general, you should not change the question to an unrelated error, you should accept the answer and open a new question.) – Brett Kail Jun 28 '16 at 13:32
  • Probably we have found the root cause of context initialization failure for InjectionException/NPE. It's looks like due to EJB context lookup failure. Do you have an idea whether ejbLite feature in Liberty supports context lookup? If not, what are best ways to call EJBs through local interfaces on Liberty. Or what feature I need to add to EJB context look up? Please suggest. – Subrata Aich Jun 29 '16 at 19:03
  • It would be best to open a new question with all the relevant details (code snippet, server.xml snippet, stack trace of the lookup failure, etc.). Yes, ejbLite certainly supports javax.naming.Context.lookup of EJBs, but you must use `java:global` names as described in the "Enterprise JavaBeans (EJB) feature restrictions" section of the [Liberty: Runtime environment known restrictions](http://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.doc/ae/rwlp_restrict.html) topic in the Knowledge Center. – Brett Kail Jun 29 '16 at 19:53