Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11739

Mysterious FilerException: Attempt to reopen a file for path ...

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      There was a report indicating that a compilation error happens while building Jenkins:

      [INFO] Copying 2 resources
      [INFO] [stapler:apt-compile {execution: default-apt-compile}]
      [INFO] Compiling 721 source files to /«PKGBUILDDIR»/core/target/classes
      [INFO]
      - ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO]
      - ------------------------------------------------------------------------
      [INFO] Compilation failure
      
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path TemporarySpaceMonitor.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path CommandConnector.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path BuildButtonColumn.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path LastSuccessColumn.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path ListView.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path MavenInstallation.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path MavenInstaller.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path Maven.stapler
      error: javax.annotation.processing.FilerException: Attempt to reopen a file for path AbstractDiskSpaceMonitor.stapler
      

      To the best of my understanding, this can only happen if our annotation processors are invoked twice with the same set of root elements, and if I'm reading it right, with JSR-269 this cannot happen.

      Since blaming JSR-269 implementation will likely take years to resolve, I'm going ahead to work around this on our side. But to make sure that I'm not mis-interpreting JSR-269 or that there's something more deeper, I'm creating this ticket to solicit feedbacks from people.

        Attachments

          Activity

          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1836
          [FIXED JENKINS-11739] Various mistakes in annotation processors affecting some plugins. (Revision 10dddebf7bd86e30b630038e5ebe0295f190a8de)

          Result = UNSTABLE
          Jesse Glick : 10dddebf7bd86e30b630038e5ebe0295f190a8de
          Files :

          • core/pom.xml
          • changelog.html
          • war/pom.xml
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1836 [FIXED JENKINS-11739] Various mistakes in annotation processors affecting some plugins. (Revision 10dddebf7bd86e30b630038e5ebe0295f190a8de) Result = UNSTABLE Jesse Glick : 10dddebf7bd86e30b630038e5ebe0295f190a8de Files : core/pom.xml changelog.html war/pom.xml
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/10dddebf7bd86e30b630038e5ebe0295f190a8de
          Log:
          [FIXED JENKINS-11739] Various mistakes in annotation processors affecting some plugins.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/10dddebf7bd86e30b630038e5ebe0295f190a8de Log: [FIXED JENKINS-11739] Various mistakes in annotation processors affecting some plugins.
          Hide
          jglick Jesse Glick added a comment -

          Final fix is in Stapler, but I did not manage to release it.

          Show
          jglick Jesse Glick added a comment - Final fix is in Stapler, but I did not manage to release it.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1829
          JENKINS-11739 Cannot compile a plugin with a Plugin subclass in the same package as a package-info.java. (Revision 88b613e95f6d8991a047f13275179e190e4c7587)

          Result = UNSTABLE
          Jesse Glick : 88b613e95f6d8991a047f13275179e190e4c7587
          Files :

          • core/src/main/java/jenkins/PluginSubtypeMarker.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1829 JENKINS-11739 Cannot compile a plugin with a Plugin subclass in the same package as a package-info.java. (Revision 88b613e95f6d8991a047f13275179e190e4c7587) Result = UNSTABLE Jesse Glick : 88b613e95f6d8991a047f13275179e190e4c7587 Files : core/src/main/java/jenkins/PluginSubtypeMarker.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/jenkins/PluginSubtypeMarker.java
          http://jenkins-ci.org/commit/jenkins/88b613e95f6d8991a047f13275179e190e4c7587
          Log:
          JENKINS-11739 Cannot compile a plugin with a Plugin subclass in the same package as a package-info.java.
          (Not quite FIXED yet since org.kohsuke.stapler.jsr269 seems to suffer from a similar bug, currently printing ugly warnings.)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/jenkins/PluginSubtypeMarker.java http://jenkins-ci.org/commit/jenkins/88b613e95f6d8991a047f13275179e190e4c7587 Log: JENKINS-11739 Cannot compile a plugin with a Plugin subclass in the same package as a package-info.java. (Not quite FIXED yet since org.kohsuke.stapler.jsr269 seems to suffer from a similar bug, currently printing ugly warnings.)

            People

            Assignee:
            kohsuke Kohsuke Kawaguchi
            Reporter:
            kohsuke Kohsuke Kawaguchi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: