java.io.FileNotFoundException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm running Cobertura on a C++ project using a coverage.xml file generated by gcovr. After the plugin has run all the source files have been erased (the files are still present in the source tree but they have no contents). To check that it was Cobertura plugin that was causing this I write-protected one of the files (atlas_wrapper.cc) before running the Jenkins build. The following is the error from the Jenkins log file... Publishing Cobertura coverage report... Publishing Cobertura coverage results... ERROR: ERROR: Failure to paint ./var/lib/jenkins/jobs/atlas/workspace/atlas/src/Wrapper/atlas_wrapper.cc to /var/lib/jenkins/jobs/atlas/cobertura java.io.FileNotFoundException: /var/lib/jenkins/jobs/atlas/workspace/atlas/src/Wrapper/atlas_wrapper.cc (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:209) at java.io.FileOutputStream.<init>(FileOutputStream.java:160) at hudson.FilePath.write(FilePath.java:1474) at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:62) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:148) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:34) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:310) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1513) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Publishing Doxygen HTML results. The determined Doxygen directory is '/var/lib/jenkins/jobs/atlas/workspace/bld/doc/html'. End publishing Doxygen HTML results. Recording test results Here "/var/lib/jenkins/jobs/atlas/workspace/atlas" is the source tree from the subversion checkout. The coverage.xml file is a soft-link from /var/lib/jenkins/jobs/atlas/workspace/atlas/coverage.xml -> /var/lib/jenkins/jobs/atlas/workspace/bld/results/coverage.xml The build tree workspace/bld is separate from the source tree (if that matters).
    via by Tony Hart,
  • I'm running Cobertura on a C++ project using a coverage.xml file generated by gcovr. After the plugin has run all the source files have been erased (the files are still present in the source tree but they have no contents). To check that it was Cobertura plugin that was causing this I write-protected one of the files (atlas_wrapper.cc) before running the Jenkins build. The following is the error from the Jenkins log file... Publishing Cobertura coverage report... Publishing Cobertura coverage results... ERROR: ERROR: Failure to paint ./var/lib/jenkins/jobs/atlas/workspace/atlas/src/Wrapper/atlas_wrapper.cc to /var/lib/jenkins/jobs/atlas/cobertura java.io.FileNotFoundException: /var/lib/jenkins/jobs/atlas/workspace/atlas/src/Wrapper/atlas_wrapper.cc (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:209) at java.io.FileOutputStream.<init>(FileOutputStream.java:160) at hudson.FilePath.write(FilePath.java:1474) at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:62) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:148) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:34) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:310) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1513) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Publishing Doxygen HTML results. The determined Doxygen directory is '/var/lib/jenkins/jobs/atlas/workspace/bld/doc/html'. End publishing Doxygen HTML results. Recording test results Here "/var/lib/jenkins/jobs/atlas/workspace/atlas" is the source tree from the subversion checkout. The coverage.xml file is a soft-link from /var/lib/jenkins/jobs/atlas/workspace/atlas/coverage.xml -> /var/lib/jenkins/jobs/atlas/workspace/bld/results/coverage.xml The build tree workspace/bld is separate from the source tree (if that matters).
    via by Tony Hart,
  • Cobertura Plugin - Jenkins - Jenkins Wiki
    via by Unknown author,
  • I have the same Problem as described in http://issues.jenkins-ci.org/browse/JENKINS-3529 My Exception is: ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.io.FileNotFoundException: C:\hudson\jobs\Test .Net Project\builds\2010-04-23_13-33-16\violations\file\RegExSearch\C:\hudson\jobs\Test .Net Project\workspace\RegExSearch\RegExSearch\Program.cs.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath.write(FilePath.java:1235) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:40) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:747) at hudson.FilePath.act(FilePath.java:729) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:564) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1267) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122)
    via by broec,
  • I checked and the pylint result file is located at alfa/test/pylint.txt and I configured the Violations Plugin to use **/alfa/test/pylint.txt as pyling xml file. When you run the job it will fail with the error below. I have to mention that "ZenALF.py" is a file from the root of the workspace, but really don't know how the violations plugin managed to create this horrible path, that looks like a concatenation of at least 3 different things. ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.io.FileNotFoundException: C:\.hudson\jobs\alf-ps\builds\2010-09-10_19-28-30\violations\file\C:\.hudson\jobs\alf-ps\workspace\ZenALF.py.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at hudson.FilePath.write(FilePath.java:1241) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:40) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1276) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) Finished: FAILURE
    via by Sorin Sbarnea,
  • I receive the following exception when the violations report is being published. ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.io.FileNotFoundException: C:\Program Files (x86)\Jenkins\jobs\Dashboard\builds\2012-10-08_16-58-57\violations\file\Dashboard.API.CcsApi+<>c__DisplayClass2a.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath.write(FilePath.java:1478) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:40) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:122) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1527) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Since this is a windows system the filename contains invalid characters. The filenames need to be encoded or formatted properly for a Windows system. I've attached the output from fxcop.
    via by Jared Szechy,
  • Using version 0.7.3 of the Violations plugin. I'm building a .Net project and using Stylecop 4.3. I've generated the stylecop XML report using StyleCopCmd on my Visual Studio 2k5 solution file and it generated XML like this: stylecop-output.xml: <?xml version="1.0" standalone="yes"?> <StyleCopReport xmlns="http://stylecopcmd.sourceforge.net/StyleCopReport.xsd"> <Solutions> <ID>0</ID> <Location>D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\OrderManagement.sln</Location> <Name>OrderManagement</Name> <Projects> <ID>0</ID> <Location>D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\OrderManagement\OrderManagement.csproj</Location> <Name>OrderManagement</Name> <SolutionID>0</SolutionID> <SourceCodeFiles> <ID>0</ID> <Path>D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\OrderManagement\config\IOperatorIdManagerConfiguration.cs</Path> <TimeStamp>2009-04-16T08:35:49+10:00</TimeStamp> <Type>CS</Type> <Name>IOperatorIdManagerConfiguration.cs</Name> <CodeProjectID>0</CodeProjectID> </SourceCodeFiles> ... etc stylecop-output.violations.xml: <StyleCopViolations> <Violation Section="Root.com.gsjbw.traderworkstation.services.clientordermanagement.config.ConfigUtils.CreateConfigurationException%string%string[]" LineNumber="18" Source="D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\OrderManagement\config\ConfigUtils.cs" RuleNamespace="Microsoft.StyleCop.CSharp.DocumentationRules" Rule="ElementsMustBeDocumented" RuleId="SA1600">The method must have a documentation header.</Violation> <Violation Section="Root.com.gsjbw.traderworkstation.services.clientordermanagement.config.ISonicJmsConfiguration.JmsDelayEnabled" LineNumber="34" Source="D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\OrderManagement\config\ISonicJmsConfiguration.cs" RuleNamespace="Microsoft.StyleCop.CSharp.DocumentationRules" Rule="ElementsMustBeDocumented" RuleId="SA1600">The property must have a documentation header.</Violation> Etc... NOTE the absolute path names for the Source attribute. With the violations plugin enabled for the build and "XML filename pattern" set to "**/build/stylecop-output*.xml" I get the following exception. Note I have not set the "Faux Project Directory" or "Source Path Pattern" settings to anything. If this is the problem what should I be setting them to? They documentation is not clear. My code does not existing in a single directory like Java code usually does. All code is beneath this directory though: D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev The exception text: FATAL: D:\CI\jobs\TW COMS\builds\2009-04-21_15-23-54\violations\file\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\build\D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\Shared\ServiceUtility\exception\GSJBWTimeoutException.cs.xml (The filename, directory name, or volume label syntax is incorrect) java.io.FileNotFoundException: D:\CI\jobs\TW COMS\builds\2009-04-21_15-23-54\violations\file\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\OrderManagement\build\D:\CI\jobs\TW COMS\workspace\twcoms_v\Order_Management_Products_VOB\TraderWorkstationMS\Dev\Shared\ServiceUtility\exception\GSJBWTimeoutException.cs.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at hudson.FilePath.write(FilePath.java:906) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:40) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:124) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27) at hudson.FilePath.act(FilePath.java:552) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:77) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:56) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:372) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:360) at hudson.model.Build$RunnerImpl.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:345) at hudson.model.Run.run(Run.java:943) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119)
    via by orj76,
  • I receive the following exception when the violations report is being published. ERROR: Publisher hudson.plugins.violations.ViolationsPublisher aborted due to exception java.io.FileNotFoundException: C:\Program Files (x86)\Jenkins\jobs\Dashboard\builds\2012-10-08_16-58-57\violations\file\Dashboard.API.CcsApi+<>c__DisplayClass2a.xml (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at hudson.FilePath.write(FilePath.java:1478) at hudson.plugins.violations.generate.ExecuteFilePath.execute(ExecuteFilePath.java:40) at hudson.plugins.violations.generate.GenerateXML.execute(GenerateXML.java:47) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:122) at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:25) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1527) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Since this is a windows system the filename contains invalid characters. The filenames need to be encoded or formatted properly for a Windows system. I've attached the output from fxcop.
    via by Jared Szechy,
    • java.io.FileNotFoundException: /var/lib/jenkins/jobs/atlas/workspace/atlas/src/Wrapper/atlas_wrapper.cc (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:209) at java.io.FileOutputStream.<init>(FileOutputStream.java:160) at hudson.FilePath.write(FilePath.java:1474) at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:62) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:148) at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:34) at hudson.FilePath.act(FilePath.java:842) at hudson.FilePath.act(FilePath.java:824) at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:310) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1513) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236)

    Users with the same issue

    filipebatista
    4 times, last one,
    Matty
    1 times, last one,
    Unknown visitor1 times, last one,
    Axelo
    2 times, last one,
    rp
    1 times, last one,
    150 more bugmates