Hudson builds suddenly fail, “due to a bug in the code”

All builds suddenly fail with the following message:

ERROR: Processing failed due to a bug in the code. Please report this to hudson-users@googlegroups.com
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of 
  at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
  at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:839)
  at net.sf.json.JSONObject._fromString(JSONObject.java:1060)
  at net.sf.json.JSONObject.fromObject(JSONObject.java:176)
  at net.sf.json.JSONObject.fromObject(JSONObject.java:147)
  at hudson.model.DownloadService$Downloadable.getData(DownloadService.java:196)
        ...

For some reason this is caused by the $HUDSON_HOME/updates/hudson.tasks.Maven.MavenInstaller file which was empty.
Putting “{}” (an empty JSON object) in there allowed builds to work again.

One Comment

  1. Thanks! I ran into this issue just today, and your fix did the trick.

Leave a Reply to Antonio García Domínguez Cancel reply

Your email address will not be published. Required fields are marked *

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

*