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:

Anonymous said...

Replacing the two files worked for me. Thanks!

Bhaskar Reddy said...

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

atar said...

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

Franco said...

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

michael said...

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

Anonymous said...

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

CHANDRA said...

Thank you for the fix.

Muhammad Ahmad Raza said...

Thanks for the fix. Replacing file works.

Anonymous said...

Thanks for the fix.

Anonymous said...

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

p@vloskl said...

Thanks!! It worked for me having cruisecontrol 2.8.3!!!

Brad said...

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.