I have ran JPF and got the following error:
com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read sun_checks.xml - unable to read from stream
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:332)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:285)
at com.puppycrawl.tools.checkstyle.Main.loadConfig(Main.java:224)
at com.puppycrawl.tools.checkstyle.Main.main(Main.java:97)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read from stream
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:400)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:324)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:285)
at com.puppycrawl.tools.checkstyle.Main.loadConfig(Main.java:224)
at com.puppycrawl.tools.checkstyle.Main.main(Main.java:97)
Caused by: java.io.FileNotFoundException: /Users/fork/Documents/workspace/checkstyle-5.3/UTF-8
at java.io.FileInputStream.<init>(FileInputStream.java:36)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(AbstractLoader.java:98)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputSource(ConfigurationLoader.java:272)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:383)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:324)
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:285)
at com.puppycrawl.tools.checkstyle.Main.loadConfig(Main.java:224)
at com.puppycrawl.tools.checkstyle.Main.main(Main.java:97)
The error makes me believe that this is due to the use of Native methods that (as far as I know) JPF does not support. If this is the case how does one work around this limitation, if possible?
Tiago Veloso
ti.v...@gmail.com
I've added a logger to our FileDescriptor native peer, activate it with "log.info=java.io.FileDescriptor"
-- Peter
Then I provably have something wrong with the properties file. However, this time I have copy pasted the target and target-args from the file to my console and I was able to run checkstyle without any issues using the following command:
java com.puppycrawl.tools.checkstyle.Main -c sun_checks.xml src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java
In the properties file it looks like:
target = com.puppycrawl.tools.checkstyle.Main
target_args = -c,sun_checks.xml,src/checkstyle/com/puppycrawl/tools/checkstyle/Checker.java
..... classpath and serach class ....
You are right, it is not finding a file, the file is UTF-8, which I also don't have, but that does not present a problem when running checkstyle with the regular VM.
Any idea what it might be?
Tiago Veloso
ti.v...@gmail.com
-- Peter
Tiago Veloso
ti.v...@gmail.com
Try to reproduce this with a simple example and I have a look
-- Peter
I'll let you know my findings.
BTW, Checkstyle works on JDK 1.5, if you'd like to try it out.
Tiago Veloso
ti.v...@gmail.com