Important information for Rational Application Developer (RAD) 6/7 users
Due to a bug in IBMs J9 VM on which RAD runs, out of the box usage of the Eclipse
Checkstyle Plugin will with almost certainty lead to crashes of RAD.
The problem is acknowledged by IBM, considering this technote. However, even as there is a official bug report open at IBM since
July 2006 this problem has not been fixed yet, although the above mentioned technote
seems to point at a specific problem location.
Luckily there are two options to work around the VM crash issues:
-
Disable the plugins project classloader:
Go to Window->Preferences->Checkstyle and tick the Disable project
classloader checkbox.
Important:
It is absolutely crucial to do a minor change to your
Checkstyle configuration. There are currently two checks in Checkstyle which
load class information of the code to be checked. Those two checks are
JavadocMethod and RedundantThrows. Both checks have a
setting called logLoadErrors, which must be set to
true. Failure to do so will result in Checkstyle throwing
RuntimeException on the attempted classloading. These RuntimeExceptions manifest
themselves in the plugin as error markes in the checked source files, all with a
problem description like: Unable to find class information for XYZ.
-
Disable J9s class garbage collection:
As suggested in the technote it is possible to disable J9s class data garbage collection,
using the -Xnoclassgc option in eclipse.ini, which is placed in RADs
installation folder. With this option the project classloader does
not need to be disabled. The downside however is that RAD accumulates more
memory and might run into OutOfMemory errors more often (avg. once per work day
- this is my personal experience, mileage my vary). TODO: add eclipse.ini
sample
If you have strong ties to IBM or a nice and shiny support contract, please help us get
this problem fixed once and for all. Please lobby your IBM contact person or product
support to fix the VM bug. Thank you!
|