Bug 1029557

Summary: Legacy JSF pages fail to display and reports failure in error.xhtml due to NullPointerException
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: JON 3.1.2CC: tsegismo
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-09 17:43:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Log excerpt from original case where this issue is occurring
none
Root error logged by Byteman prior to rendering of error.xhtml none

Description Larry O'Leary 2013-11-12 15:39:06 UTC
Created attachment 823024 [details]
Log excerpt from original case where this issue is occurring

Description of problem:
When attempting to view the monitoring graph page for any resource, the page fails to load and instead the following error occurs:

    ERROR [org.rhq.enterprise.gui.common.framework.FaceletRedirectionViewHandler] Redirected back to ourselves, there must be a problem with the error.xhtml page
    java.lang.NullPointerException
        at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
        at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
        at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
        at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
        at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
        at org.rhq.enterprise.gui.common.framework.FaceletRedirectionViewHandler.renderView(FaceletRedirectionViewHandler.java:64)
        ...
    ERROR [facelets.viewhandler] Error Rendering View[/rhq/common/error.xhtml]


The error message seems to be related to an error with rendering error.xhtml and does not appear to be relevant to the actual monitoring page failure. In other words, what seems to be logged and reported is that the error page failed. However, the assumption is that the error page was being loaded due to an error on the graphs page which unfortunately does not get logged or reported (probably due to the failure in the error page).

Version-Release number of selected component (if applicable):
4.4.0.JON312GA

Additional info:
This error occurred when the user attempted to access http://jon-server:7080/coregui/#Resource/10011/Monitoring/Graphs. However, it happens on access of any resource's monitoring graphs page.

Comment 1 Thomas Segismont 2013-11-14 14:00:24 UTC
Changed exception logging logic in master

commit 0c0e8e2cb6de3d0cc8ef30a5e079c3cf1df3d2ca
Author: Thomas Segismont <tsegismo>
Date:   Thu Nov 14 14:58:41 2013 +0100

Do not wait execution of #GenericErrorUIBean() to print out exception to server log
    
This is to make sure we always log the exception, even if the error page cannot be displayed.

Comment 2 Larry O'Leary 2013-11-18 17:57:37 UTC
Created attachment 825770 [details]
Root error logged by Byteman prior to rendering of error.xhtml

The root error (that seems to cause the load of error.xhtml) seems to be the same type of issue. However, from the attached stack, it would appear that the issue relates to class loading problems within JSF.

Please note that this error seems to occur on any JSF related page.

Comment 3 Larry O'Leary 2013-11-18 17:59:56 UTC
The title of this BZ has been updated to reflect that this issue is not limited to the resource graph pages but instead to any UI page that uses a legacy JSF component. For example it also affects the Administration Topology / [Servers | Agents | Affinity Groups] pages.

Comment 4 Larry O'Leary 2013-12-09 17:43:44 UTC
This issue was caused by a corrupt JBoss ON server installation. Specifically, a META-INF directory had been added to ${RHQ_SERVER_HOME}/jbossas/server/default/deploy/jboss-web.deployer/ROOT.war which was owned by user root and had file permissions of 0700:

    ls -ald "${RHQ_SERVER_HOME}/jbossas/server/default/deploy/jboss-web.deployer/ROOT.war/META-INF"
    drwx------. 2 root root 4096 Dec  9 10:46 /opt/jboss/jboss-on/jon-server/jbossas/server/default/deploy/jboss-web.deployer/ROOT.war/META-INF


This results in JSF failing to initialize because it can not read the contents of ROOT.war's META-INF directory.

As this identifies an issue in JSF itself and JBoss ON is moving all legacy JSF components to the new UI implementation, there is no plans to pursue this issue.

The fix is to re-install the JBoss ON server or repair the corrupted directory structure or incorrect file permissions.