Question

I wrote some Hudson plugin's that have changed a bit in terms of the fields and class names (re factoring mostly to clean up the code). Generally speaking everything works fine, but when starting up, Hudson will unmarshall previous plugin data within the build xml.

As most of us know who have done Hudson plugins, hudson will use camel-xstream (or a tool similar) and Hudson will persist the Java objects by marshalling the object's class, state and fields to the build.xml file. If the Object changes and a field name is changed or removed an exception is thrown similar to "Cannot find field x because it does not exist"

My question is - Is there a way to clean up that plugin data so that when I install a new version of the plugin old information will not be persisted and will not cause these unmarshalling exceptions to be thrown?

Thank you

Was it helpful?

Solution

After researching the problem I was trying to resolve I found that Hudson actually has a resolution to this built in.

To be able to resolve start up issues you can do the following:

  1. Go to Manage Hudson link
  2. If it failed to unmarshall objects a link appears at the top of the page that reads
    • 'You have data stored in an older format and/or unreadable data.'
  3. Click on Manage button
  4. There will be a list of all failures
    • press the Discard Unreachable Data button
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top