[hibernate-dev] [Search] New checkstyle classes working in IDE

Hardy Ferentschik hardy at hibernate.org
Wed Jul 10 08:08:31 EDT 2013


Hi,

I am wondering whether anyone can use the checkstyle plugin after HSEARCH-1326 and the introduction of our own custom Checkstyle Checks (Eclipse or Idea)?
I have been using the Idea Checkstyle plugin and that worked just fine. But since the latest changes I get the following exception:

java.lang.IllegalAccessError: com/puppycrawl/tools/checkstyle/checks/regexp/CommentSuppressor
	at com.puppycrawl.tools.checkstyle.checks.regexp.DoubleSpacesCheck.<init>(DoubleSpacesCheck.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:357)
	at java.lang.Class.newInstance(Class.java:310)
	at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createObject(PackageObjectFactory.java:113)
	at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:91)
	at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
	at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
	at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
	at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
	at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
	at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:312)


This seems to be related - http://osdir.com/ml/java.audit.checkstyle.devel/2005-10/msg00036.html and suggests that there might be class loader issues.

I think it was a great idea to introduce checkstyle, but I think it really needs to work in the IDE as well. Obviously we always had problems
creating a formatting templates for Eclipse respective Idea which generate the same result. Since the introduction of Checkstyle that problem was
alleviated, since I could fix potential problem manually. Now we are back to square one.

If we cannot find a solution for this I vote for disabling these custom checks for now.

--Hardy




More information about the hibernate-dev mailing list