Re: Checkstyle Custom rule fails to instantiate
"Mark Tymieniecki" <[email protected]> Thu, 2 Feb 2012 12:25:22 -0000
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Lars,
I am running Windows 7, and have set CLASSPATH correctly(trying both \ and /
in that path!), but cannot run directly from another folder so have to use
the -JAR option and then with the full path.
This is what it all end up looking like:
C:\02-Client-Code\Client\Checkstyle>java -D64 -jar
c:/checkstyle-5.5/checkstyle-5.5-all.jar -c
"C:/02-Client-Code/Client/Checkstyle/client_checks.xml" -f
xml -o C:/02-Client-Code/Client/Checkstyle/Client_checkstyle_errors.xml -r
"E:/Eclipse Projects/Client_Rules_Test/src"
Unable to create Checker: cannot initialize module TreeWalker - Unable to
instantiate LoggerAttr
com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize
module TreeWalker - Unable to instantiate LoggerAttr
at
com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at
com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(Automatic
Bean.java:184)
at com.puppycrawl.tools.checkstyle.Main.createChecker(Main.java:143)
at com.puppycrawl.tools.checkstyle.Main.main(Main.java:120)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable
to instantiate LoggerAttr
at
com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObj
ectFactory.java:155)
at
com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
at
com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.ja
va:184)
at
com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157) =
... 3 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable
to instantiate LoggerAttrCheck
at
com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObj
ectFactory.java:98)
at
com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObj
ectFactory.java:152)
... 6 more
This is very worrying as I have now tried it on three platforms and get the
same result each time.
Regards
-----Original Message-----
From: Lars K=F6dderitzsch [mailto:[email protected]] =
Sent: 01 February 2012 18:16
To: [email protected]
Subject: Re: [Checkstyle-user] Checkstyle Custom rule fails to instantiate
Hello Mark,
if I got it right you need to fully specify each jar in the CLASSPATH
variable (or via -cp cmd line option) or use a classpath wildcard to pick up
all jars in a folder (e.g. foo/*).
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html
HTH,
Lars
| Snipped for less scrolling
----------------------------------------------------------------------------
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is
just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro
Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
---------------------------------------------------------------------------=
---
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d