Bug 807551

Summary: csprocessor 0.22 push explodes
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: jwulf, lcarlon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.22.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-01 07:48:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
CSProcessor project folder none

Description Joshua Wulf 2012-03-28 06:28:28 UTC
cspclient-0.22.5-1.noarch
OS: Fedora release 16 (Verne)

JAVA: java version "1.7.0_b147-icedtea"
OpenJDK Runtime Environment (fedora-2.1.fc16.1-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)


[jwulf@nitai Content_Spec_Processor_Guide]$ csprocessor push
CSProcessor client version: 0.22.5
Loading configuration from /home/jwulf/.config/csprocessor.ini
Connecting to Skynet server: http://skynet.usersys.redhat.com:8080/TopicIndex/

INFO:  The Content Specification is valid.
INFO:  The Content Specification saved successfully.

Content Specification ID: 7210
Revision: 56403
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NullPointerException
	at com.redhat.contentspec.client.commands.PushCommand.process(PushCommand.java:180)
	at com.redhat.contentspec.client.Client.processArgs(Client.java:201)
	at com.redhat.contentspec.client.Client.main(Client.java:89)
	... 5 more

Comment 1 Joshua Wulf 2012-03-28 06:29:18 UTC
Created attachment 573244 [details]
CSProcessor project folder

Comment 2 Lee Newson 2012-03-28 06:44:10 UTC
Fixed in 0.22.6

Cause:
The program was trying to create the directories for the output file. However if the directory was the current working directory there was no parent and it threw a NullPointerException.

Consequence:
The program would crash and couldn't save the new Content Specification to the users file system. The server however was updated.

Fix:
Check if the parent is null, if it is then there isn't any need to try to create the directories.

Comment 3 Joshua Wulf 2012-05-01 07:48:04 UTC
Verified with 0.23.2-1