Thursday, January 10, 2013

CruiseControl 2.8.4 and JDK7

Upgraded system JDK to Java 7 and noticed that the dashboard in your CruiseControl stays gray?
Well there is even an official bug CC-1049 in the JIRA (currently it seems to be down, I used Google cache to access it).

With -debug switch on there is a hint error message:

Cannot construct net.sourceforge.cruisecontrol.BuildLoopInformation as it does not have a no-args constructor.

The root of the problem: Oracle changed the vendor name from "Sun Microsystems Inc." to “Oracle Corporation”. The solution is really simple, either add

-Djava.vm.vendor="Sun Microsystems Inc." -XX:+OverrideVMProperties

to your java call in cruisecontrol.sh , or replace xstream-1.2.2.jar and xpp3_min-1.1.3.4.O.jar files both in lib/ and webapps/dashboard/WEB-INF/lib/ with xstream-1.4.1.jar and kxml2-2.3.0.jar respectively.

12 comments:

  1. Replacing the two files worked for me. Thanks!

    ReplyDelete
  2. I am using Cruisecontorl 2.8.3 and after my jdk7 upgrade it is not working Dashboard, Can you give me some suggestion

    ReplyDelete
  3. I think it's the same as with 2.8.3. Have you tried what is described above?

    ReplyDelete
  4. Brilliant - replacing the two jars solved this problem for me. Thank you for sharing!

    ReplyDelete
  5. i tried the first option on Solaris 10 and got an error from JVM: Unrecognized JVM option: OverrideVMProperties

    ReplyDelete
  6. I do confirm - this fix is working for CruiseControl 2.8.2 also.
    Artem - you saved my day!

    ReplyDelete
  7. Thanks for the fix. Replacing file works.

    ReplyDelete
  8. Thanks for the fix.

    ReplyDelete
  9. Perfectly working after removing the xstream-1.2.1 and pasting your 1.4.1

    ReplyDelete
  10. Thanks!! It worked for me having cruisecontrol 2.8.3!!!

    ReplyDelete
  11. Thank you! I tried the first option. However, I modified it to only add the following:

    -Djava.vm.vendor="Sun Microsystems Inc."

    as using the entire string didn't work.

    ReplyDelete