views:

3501

answers:

1

Got this error today while trying to build a project with checkstyle. This works for other people in my office but I would rather not reinstall Eclipse yet again. Any idea what this error actually means?

Errors occurred during the build.
 Errors running builder 'Checkstyle Builder' on project 'myproject'.
  cannot initialize module TreeWalker - Unable to instantiate TabCharacter
  cannot initialize module TreeWalker - Unable to instantiate TabCharacter
 cannot initialize module TreeWalker - Unable to instantiate TabCharacter
 cannot initialize module TreeWalker - Unable to instantiate TabCharacter

I'm gathering that it has something to do with the tab character but not much else.

UPDATE: Version of Eclipse is 3.5, Checkstyle is 5.0.0.200906281855-final.

(Java is jdk 1.6.0_10)

+3  A: 

What version of Checkstyle are you using (while we are at it, what version of eclipse, Checkstyle plugin, java?)

As mentioned in this bug, Checkstyle Plugin version 5.0.0.200906281855:

Release notes of Checkstyle 5 state that some of the modules and checks we are using are not backwards compatible.
E.g. the module TabCharacter does not occur in v5 any more (was replaced by FileTabCharacter), hence can't work.
The check FileLength does not require a syntax tree, hence is not any longer under parent TreeWalker.

That means your issue could be with an automatic update of the Checkstyle plugin in your eclipse configuration.

VonC
Updated my question with versions.
Stefan Thyberg
Found the problem and it was indeed this. Apparently I'm a version of checkstyle ahead of others. Modified checkstyle.xml to fit 5.0.0, thanks for the help.
Stefan Thyberg