Hey Silvio,
- Original Message -
> Hi,
>
> We had a downstream bug that boiled down to an uncaught exception in
> XMLRPC serialization code (a class implementing XmlRpcCustomSerializer).
>
> AFAIU at the moment any uncaught exception from by the serialize() is
> basically ignored, "digested" by the redstone library and not added to
> any log or error output, making it quite hard to find out issues. I
> would like to add some code to add some exception details to the error log.
>
> You can easily reproduce the bug on basically any Spacewalk version by
> adding a line like this:
>
> throw new NullPointerException();
>
> to ServerSerializer.serialize(), then calling via API any XMLRPC method
> that returns a server.
>
> Proposed solution would be to try-wrap all serialize() methods in the
> application, which is the only way I can think of to handle those
> exceptions in Spacewalk code, since this problem really stems from
> redstone. Creating a superclass is unfortunately not an option because
> the serialize() method signature can change.
>
> Any feedback or better idea is welcome. In case this is really the only
> viable solution, would you accept such a patch?
I decided there *had to* be a better way to do this - and I found one!
See commit 1fddc7359c54dcfae38505c55a6074144685e2f5 - built an abstract base
class, refactored[1] the FooSerializer classes to extend it, and made
SerializerFactory less dumb (and smaller!)
I've tested a number of random API calls, and the serialization JUnits pass,
but More Eyes would be great. Also, RhnXmlRpcCustomSerializer.serialize()
could probably do something better in terms of logging.
Let me know what you think!
G
[1] Between sed and Eclipse, *nothing* is safe :)
>
> Regards,
> --
> Silvio Moioli
> SUSE LINUX Products GmbH
> Maxfeldstraße 5, 90409 Nürnberg Germany
>
> ___
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel
>
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel