Question

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)

Was it helpful?

Solution

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.

OTHER TIPS

"Same" problem will occur, if you use a checkstyle configuration with self defined cs plugin classes and your plugin.jar is not in your eclipse/plugin path.

So in this case error will just say: Hey dude: can't find your classes, please give it to me ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top