Re: checkstyle4nb produeces ClassCastExcpetion
"Thomas Zillinger" <[email protected]>
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
The thing is, I downloaded the checkstyle4nb.nbm and installed it and this error (above) occured. And then I downloaded the source to find out what's going on here and traced the error down to the checker.process(..) method where Checkstyle callsback via a listener and returns the error. I also downloaded the source of cs-eclipse to figure out what they do differently. Apart from calling checker.process(..) they also set the ClassLoader of ThreadLocal. I guess they must have had a similar problem.... Tom -------- Original-Nachricht -------- Datum: Wed, 25 Apr 2007 21:55:29 +0200 Von: "Lars Kühne" <[email protected]> An: [email protected] Betreff: Re: [Checkstyle-user] checkstyle4nb produeces ClassCastExcpetion > Hi Tom, > > I'm not familiar with Netbeans, but in Eclipse you don't have to mess > around with jar files at all to use the checkstyle plugin. You > download and install the plugin as a whole. Internally the plugin > contains jars of course, but the user does not have to think about > them at all. > > The nbcheckstyle installation instructions [1] suggest that a similar > system exists in Netbeans. A plugin is contained in an nbm file, which > in turn contains all required jars. You install the nbm via the Update > Center GUI, not by adding jars to the netbeans command line. > > Did you follow the installation instructions of the nbcheckstyle > plugin? Why do you have to deal with individual checkstyle > implementation jars, and not the nbm file? > > If this is not pointing you in the right direction, it might be easier > for others to help you if you could tell them which versions of > Netbeans and the nbcheckstyle plugin you are using. > > Cheers, > Lars > > [1] http://nbcheckstyle.sourceforge.net/#installation > > On 4/25/07, Thomas Zillinger wrote: > > Hmmmm, I guess that was not the answer, since when I run nb only with > > > > > > checkstyle-4.3.jar:\ > > checkstyle-optional-4.3.jar:\ > > commons-beanutils-core.jar:\ > > commons-collections.jar:\ > > commons-logging.jar:\ > > commons-cli.jar > > > > I get a java.lang.NoClassDefFoundError: antlr/CommonAST from the > ClassLoader.... > > > > I think Nb runs every module in its own ClassLoader. > > What else could be a reason, any idea? > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user -- Psalm 111,2: "Groß sind die Werke des Herrn; wer sie erforscht, der hat Freude daran." "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/