nbCheckstyle 3.4.0 crashes

Help
Nikoladis
2004-06-16
2013-03-22
  • Nikoladis
    Nikoladis
    2004-06-16

    I installed "nbCheckstyle 3.4.0" into Netbeans 3.6

    I configured it to point to the conf. file which is distributed with the nbCheckstyle.

    When I try it on sourcecode I get this:
    An error occurred during initialization.
    Make sure there is a configuration file set under Tools->Options->Uncategorized->CheckstyleOptions
    com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to parse C:\Documents and Settings\Nikolai\Desktop\nbcheckstyle-full-3.4.0\checkstyle.properties - Content is not allowed in prolog.:1:1
            at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:261)
            at com.goulbourn.docenforcer.CheckstyleAction.runChecker(CheckstyleAction.java:349)
            at com.goulbourn.docenforcer.CheckstyleAction.performAction(CheckstyleAction.java:309)
            at org.openide.util.actions.NodeAction.performAction(NodeAction.java:193)
            at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:78)
            at org.openide.util.actions.CallableSystemAction$ActionRunnable.actionPerformed(CallableSystemAction.java:247)
            at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:71)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.openide.util.actions.CallableSystemAction.invokeAction(CallableSystemAction.java:179)
            at org.openide.util.actions.CallableSystemAction.access$000(CallableSystemAction.java:31)
            at org.openide.util.actions.CallableSystemAction$ActionRunnable.doRun(CallableSystemAction.java:241)
            at org.openide.util.actions.CallableSystemAction$2.run(CallableSystemAction.java:111)
            at org.openide.util.Task.run(Task.java:136)
            at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
            at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
    Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(AbstractLoader.java:95)
            at com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(ConfigurationLoader.java:219)
            at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:248)
            ... 17 more
    Done.

     
    • Nikoladis
      Nikoladis
      2004-06-16

      I have another question:

      Am I supposed to download checkstyle and use that in the installation, is that the reason for the exception I get? Or do nbCheckstyle include checkstyle?

      And if I need to download checkstyle, who do I integrate it with nbCheckstyle?

       
    • Nikoladis
      Nikoladis
      2004-06-16

      Btw. I use windows XP pro, SP1

      Java 1.4.2

       
    • Steven Caswell
      Steven Caswell
      2004-06-23

      Guessing from your stack track, it looks like you might have used a properties file for the Checkstyle configuration. Checkstyle 3.x required an xml file, so you might try reconfiguring nbCheckstyle with an xml configuration file.

       
    • saif
      saif
      2004-10-19

      Have downloaded checkstyle3.4  which xml file i need to configure to nbcheckstyle.