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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    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

          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.)

          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.)
          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
          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
          jglick Jesse Glick added a comment -

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

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

          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.

          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.
          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
          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

          People

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

            Dates

              Created:
              Updated:
              Resolved: