Bug 1009652

Summary: SCAP scan based on an empty XCCDF file triggers NullPointerException
Product: [Community] Spacewalk Reporter: Šimon Lukašík <slukasik>
Component: WebUIAssignee: Šimon Lukašík <slukasik>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-04 13:06:59 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1069560    
Attachments:
Description Flags
This is what I call 'empty' XCCDF file none

Description Šimon Lukašík 2013-09-18 19:32:10 UTC
Description of problem:
The SCAP scan driven by an empty XCCDF Benchmark file
(without any Rule elements) brings Spacewalk's web UI
interface to Internal Server Error

Version-Release number of selected component (if applicable):
any SCAP enabled Spacewalk (reproduced on Spacewalk 1.9)

How reproducible:
deterministic

Steps to Reproduce:
1. Scan a system with an 'empty' XCCDF file
2. Observe appropriate systems/details/audit/ListScap.do page
3.

Actual results:
java.lang.NullPointerException
at com.redhat.rhn.frontend.dto.XccdfTestResultCounts.getSum(XccdfTestResultCounts.java:178)
at sun.reflect.GeneratedMethodAccessor5129.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)

Expected results:
No exceptions. Empty results rendered correctly.

Additional info:

Comment 1 Šimon Lukašík 2013-09-18 19:37:43 UTC
Created attachment 799558 [details]
This is what I call 'empty' XCCDF file

Comment 2 Šimon Lukašík 2013-09-19 11:21:50 UTC
This has been fixed. The fix will become part of Spacewalk 2.1.

spacewalk.git 671f9d47368f0302c01dca110e6877138338f826

Comment 3 Matej Kollar 2014-01-17 12:15:52 UTC
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.

Comment 4 Matej Kollar 2014-03-04 13:06:59 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 5 Matej Kollar 2014-03-04 13:08:40 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21