[JIRA] (JENKINS-39651) FileNotFoundException when scanning compiler warnings in multibranch pipeline

7 Aufrufe
Direkt zur ersten ungelesenen Nachricht

vincent.privat@gmail.com (JIRA)

ungelesen,
10.11.2016, 12:17:0110.11.16
an jenkinsc...@googlegroups.com
Vincent Privat created an issue
 
Jenkins / Bug JENKINS-39651
FileNotFoundException when scanning compiler warnings in multibranch pipeline
Issue Type: Bug Bug
Assignee: Ulli Hafner
Components: warnings-plugin
Created: 2016/Nov/10 5:16 PM
Environment: Jenkins ver. 2.19.2, Linux RHEL7, warnings 4.57
Labels: pipeline multibranch
Priority: Minor Minor
Reporter: Vincent Privat

We use warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:

stage('Build')

{ maven '-DskipTests clean install -P TOMCAT' maven '-DskipTests clean install -P WAS' step([$class: 'WarningsPublisher', parserConfigurations: [[parserName: 'AspectJ Compiler (ajc)'], [parserName: 'Java Compiler (javac)']]]) }

It works fine, but Jenkins reports an error in the job summary for each parser:

Ajc Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

Java Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

The error is the same: the plugin tries to open a directory (as a file ?) and face FileNotFoundException:

Module : Parsing of file /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA failed due to an exception: java.io.FileNotFoundException: /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.plugins.warnings.parser.ParserRegistry.createReader(ParserRegistry.java:325) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:281) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:261) at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:44) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:325) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:283) at hudson.plugins.analysis.core.FilesParser.parseSingleFile(FilesParser.java:241) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:200) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.plugins.warnings.WarningsPublisher.parseFiles(WarningsPublisher.java:400) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:298) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:68) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:280) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) at hudson.security.ACL.impersonate(ACL.java:221) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

ungelesen,
10.11.2016, 16:43:0210.11.16
an jenkinsc...@googlegroups.com
Ulli Hafner commented on Bug JENKINS-39651
 
Re: FileNotFoundException when scanning compiler warnings in multibranch pipeline

Can you please wrap your blocks in the description with noformat tags?

vincent.privat@gmail.com (JIRA)

ungelesen,
10.11.2016, 17:36:0210.11.16
an jenkinsc...@googlegroups.com
Vincent Privat updated an issue
 
Change By: Vincent Privat
We use used warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:

{{   stage('Build') {
      maven '-DskipTests clean install -P TOMCAT'
      maven '-DskipTests clean install -P WAS'
      step([$class: 'WarningsPublisher', parserConfigurations: [[parserName: 'AspectJ Compiler (ajc)'], [parserName: 'Java Compiler (javac)']]])
  }
}}

It works fine This is incorrect usage (we found later that we must use "consoleParsers" instead of "parserConfigurations") , but Jenkins reports an unclear error in the job summary for each parser:


Ajc Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

Java Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

The error is the same: the plugin tries to open a directory (as a file ?) and face FileNotFoundException:

Module : Parsing of file /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA failed due to an exception: java.io.FileNotFoundException: /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.plugins.warnings.parser.ParserRegistry.createReader(ParserRegistry.java:325) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:281) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:261) at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:44) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:325) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:283) at hudson.plugins.analysis.core.FilesParser.parseSingleFile(FilesParser.java:241) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:200) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.plugins.warnings.WarningsPublisher.parseFiles(WarningsPublisher.java:400) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:298) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:68) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:280) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) at hudson.security.ACL.impersonate(ACL.java:221) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

vincent.privat@gmail.com (JIRA)

ungelesen,
10.11.2016, 17:37:0210.11.16
an jenkinsc...@googlegroups.com
Vincent Privat updated an issue
We used warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:

{
{ code:java}
  stage('Build') {
      maven '-DskipTests clean install -P TOMCAT'
      maven '-DskipTests clean install -P WAS'
      step([$class: 'WarningsPublisher', parserConfigurations: [[parserName: 'AspectJ Compiler (ajc)'], [parserName: 'Java Compiler (javac)']]])
  }

{code
} }

This is incorrect usage (we found later that we must use "consoleParsers" instead of "parserConfigurations"), but Jenkins reports an unclear error in the job summary for each parser:


Ajc Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

Java Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

The error is the same: the plugin tries to open a directory (as a file ?) and face FileNotFoundException:

Module : Parsing of file /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA failed due to an exception: java.io.FileNotFoundException: /var/lib/jenkins/workspace/<project>-TYZ4HTMUDELQTO2KFI4T3R4ABMOEN4QPSBNFVWREXQY4ETHJWNNA (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.plugins.warnings.parser.ParserRegistry.createReader(ParserRegistry.java:325) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:281) at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:261) at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:44) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:325) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:283) at hudson.plugins.analysis.core.FilesParser.parseSingleFile(FilesParser.java:241) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:200) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.plugins.warnings.WarningsPublisher.parseFiles(WarningsPublisher.java:400) at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:298) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:68) at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:280) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) at hudson.security.ACL.impersonate(ACL.java:221) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

vincent.privat@gmail.com (JIRA)

ungelesen,
10.11.2016, 17:39:0110.11.16
an jenkinsc...@googlegroups.com
Vincent Privat updated an issue
We used warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:

{code:java}
  stage('Build') {
      maven '-DskipTests clean install -P TOMCAT'
      maven '-DskipTests clean install -P WAS'
      step([$class: 'WarningsPublisher', parserConfigurations: [[parserName: 'AspectJ Compiler (ajc)'], [parserName: 'Java Compiler (javac)']]])
  }
{code}

This is incorrect usage (we found later that we must use "consoleParsers" instead of "parserConfigurations"), but Jenkins reports an unclear error in the job summary for each parser:

Ajc Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

Java Warnings: 0 warnings from one analysis.
During parsing an error has been reported.

The error is the same: the plugin tries to open a directory (as a file ?) and face FileNotFoundException:

{noformat}

{noformat}

vincent.privat@gmail.com (JIRA)

ungelesen,
10.11.2016, 17:40:0610.11.16
an jenkinsc...@googlegroups.com
Vincent Privat commented on Bug JENKINS-39651
 
Re: FileNotFoundException when scanning compiler warnings in multibranch pipeline

Sure ! The description is updated as well, we found it was incorrect usage but the error was not clear.

ullrich.hafner@gmail.com (JIRA)

ungelesen,
30.11.2016, 08:53:0130.11.16
an jenkinsc...@googlegroups.com
Ulli Hafner resolved as Not A Defect
 

Well, if you don't specify the pattern for the parserConfigurations then the default ("*/") is used.

When you don't use (the new evil) project type pipeline then this would be clearly visible in the UI.

Change By: Ulli Hafner
Status: Open Resolved
Resolution: Not A Defect

ullrich.hafner@gmail.com (JIRA)

ungelesen,
30.11.2016, 08:54:0230.11.16
an jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-39651
 
Re: FileNotFoundException when scanning compiler warnings in multibranch pipeline
Well, if you don't specify the pattern for the {{parserConfigurations}} then the default (*** * /**") is used.

When you don't use (the new evil) project type pipeline then this would be clearly visible in the UI.  

ullrich.hafner@gmail.com (JIRA)

ungelesen,
30.11.2016, 08:54:0430.11.16
an jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-39651
Well, if you don't specify the pattern for the {{parserConfigurations}} then the default ( " ** ** /* * ") is used.

When you don't use (the new evil) project type pipeline then this would be clearly visible in the UI.  

trejkaz@trypticon.org (JIRA)

ungelesen,
06.06.2018, 20:48:0106.06.18
an jenkinsc...@googlegroups.com
trejkaz commented on Bug JENKINS-39651

I'm getting this error too, but I can't understand what I'm supposed to change my config to by reading this ticket, or the source code of the task.

What we have right now:

step([$class: 'WarningsPublisher',
      parserConfigurations: [

{{         [parserName: 'Java Compiler (javac)'],}}
{{         [parserName: 'JavaDoc Tool']],}}
{{       unstableTotalAll: '0',}}
{{       usePreviousBuildAsReference: true])}}

When I was writing the config, I also didn't understand why I had to provide a glob to match files, when what the warnings plugin is supposed to be parsing is the output log.

 This was adapted from examples on https://github.com/kitconcept/jenkins-pipeline-examples as we were unable to find any information in the docs for the warnings plugin itself.

Some examples of correct usage would be really useful.

 

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

trejkaz@trypticon.org (JIRA)

ungelesen,
06.06.2018, 20:49:0206.06.18
an jenkinsc...@googlegroups.com
trejkaz edited a comment on Bug JENKINS-39651
I'm getting this error too, but I can't understand what I'm supposed to change my config to by reading this ticket, or the source code of the task.

What we have right now:

{ { code}
step([$class: 'WarningsPublisher', }}
{{      parserConfigurations: [ }}
{{         [parserName: 'Java Compiler (javac)'], }}
{{          [parserName: 'JavaDoc Tool']], }}
{{       unstableTotalAll: '0', }}
{{        usePreviousBuildAsReference: true])

{code
} }

When I was writing the config, I also didn't understand why I had to provide a glob to match files, when what the warnings plugin is _supposed_ to be parsing is the output log.


 This was adapted from examples on [https://github.com/kitconcept/jenkins-pipeline-examples] as we were unable to find any information in the docs for the warnings plugin itself.

Some examples of correct usage would be _really_ useful.

 

ullrich.hafner@gmail.com (JIRA)

ungelesen,
07.06.2018, 03:40:0207.06.18
an jenkinsc...@googlegroups.com

trejkaz@trypticon.org (JIRA)

ungelesen,
07.06.2018, 21:22:0207.06.18
an jenkinsc...@googlegroups.com
trejkaz commented on Bug JENKINS-39651

Are there syntax examples documented anywhere? Every example I see uses parserConfigurations, so it makes me wonder whether we're wrong to even want to use the console log.

ullrich.hafner@gmail.com (JIRA)

ungelesen,
08.06.2018, 05:37:0108.06.18
an jenkinsc...@googlegroups.com

I don't think so. You can create them on your own using the snippet generator.

olivier.dagenais@gmail.com (JIRA)

ungelesen,
08.10.2019, 12:12:0308.10.19
an jenkinsc...@googlegroups.com
Olivier Dagenais updated an issue
 
Change By: Olivier Dagenais
We 5We used warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

ungelesen,
08.10.2019, 13:15:0408.10.19
an jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
Change By: Ulli Hafner
5We We used warnings plugin in a multibranch pipeline Jenkinsfile for a Maven Java project as follows:
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten