[Spacewalk-list] Error with editing custom properties

Jan Pazdziora jpazdziora at redhat.com
Mon Nov 21 13:35:40 UTC 2011


On Tue, Nov 08, 2011 at 01:51:16PM -0600, Will L wrote:
> Occasionally, we get an error when trying to edit an existing custom
> property on a server (Details -> Custom Info -> Edit This Value).
> 
> There does not seem to be any reason for the errors to suddenly affect
> servers that weeks prior were just fine (no database, O/S, or
> Spacewalk upgrade). I was not getting a useful error, so I turned on
> Debugging. The only errors I received when attempting to edit the
> property are shown below.
> 
> I'm not seeing enough to have a good idea of what to check next. Any
> ideas / help?

[...]

> java.lang.NullPointerException
> 	at com.redhat.rhn.frontend.action.systems.sdc.UpdateCustomDataAction.execute(UpdateCustomDataAction.java:92)
> 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
> 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)

Will,

the problem is caused by Spacewalk's code not checking some return
value and hitting null pointer exception. I've now fixed it in
Spacewalk master, 27893dcaaf6f7985473948f391c2ff9a4cc22043.

I believe what happened was that some user edited those values
and then you've removed that user account in Spacewalk. This caused
one column to become null, and the code could not cope with it.

If you want to fix your database to be able to edit the values
before Spacewalk 1.6 with the fix is released, you might want
to find out your user id by running

	select id from web_contact where login = 'your-login';

in sqlplus, and then do something like

	update rhnServerCustomDataValue
	set created_by = the-id-you-got-in-the-previous-select
	where created_by is null;

	commit;

That should set all the values to your user id and make it possible
to edit the records.

Cheers,

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list