Thursday, February 24, 2011

Hudson/Jenkins and the missing key

A while back we began moving from one old hudson server to a new box with a newer version of hudson on it that could better handle the ever increasing load it was being given. For a while things were working fine, I do mostly AS3/Flex builds using flex-mojos and I moved a couple project to the new server with no issues. At some point (still unsure why) our flex jobs started failing. The error given was as follows:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] key can't be empty

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: key can't be empty
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

I found a couple references online to "missing key in Hudson" but none seemed to fit my situation.

Eventually I ended up creating a new test project as a multi-configuration project instead of my standard Maven 2 project, adding an empty shell script and the Maven 2 build step. This ended up solving the missing key issue, though I'm at a loss as to why.

Since I struggled with this for so long I figured I'd post it and hopefully save someone else some pain. It's quite possibly a flex-mojos bug since it didn't seem to affect the Java jobs on the server. If anyone can explain why this seems to happen I'd love to hear about it.

This occurred in a version of Hudson just before the start of the Jenkins project, so it would likely occur there as well and I thought it's worth mentioning.

Thanks,
Brent

1 comment:

Steve said...

We are having the exact same issue, going to try your suggestion. Did you ever figure out the cause?