Created attachment 859904 [details] patch to correct null pointer xmlrpc faults Systems registered with the --nohardware flag cause a null pointer exception when using the api listActiveSystemsDetails. The SystemHandler.java class does not handle null values for the DMI info, CPU, RAM or Swap and causes a xmlrpc fault: XML or text declaration not at start of entity at line 35, column 76, byte 3983 at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 187 </value></data></array></value></member><member><name>dmi_info</name><value><?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>-1</int></value></member><member><name>faultString</name><value><string>java.lang.NullPointerException: null</string></value></member></struct></value></fault></methodResponse> attaching a patch that correctly sets the structs to empty Hashmaps and instantiates Longs for RAM/Swap. Duplicator steps: 1) register a system with the --nohardware or force register existing systems 2) create a api script to call the system with no records in rhnServerDMI, rhnCPU, etc. 3) Observe the XMLRPC fault Sample perl api script for testing #!/usr/bin/perl -w use strict; use Frontier::Client; my $HOST = 'sat560.sat.lan'; my $USER = 'admin'; my $PASS = 'redhat'; my $client = new Frontier::Client(url => "http://$HOST/rpc/api", debug=>1); my $session = $client->call('auth.login', $USER, $PASS); my $ref = [1000010017]; my $foo = $client->call('system.listActiveSystemsDetails',$session, $ref);
Patch applied in spacewalk.git master: f72f426327a1006e215ab5e7cb39b7b3b24da410
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21