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

Classloading issues when running PCT against WARs created by CustomWarPackager when replacing libs

    XMLWordPrintable

Details

    Description

      Example: https://ci.jenkins.io/blue/organizations/jenkins/Core%2Fremoting/detail/PR-265/17/tests

      Error
      lib/remoting-3.17.jar
      Stacktrace
      java.io.FileNotFoundException: lib/remoting-3.17.jar
      at hudson.model.Slave$JnlpJar.getURL(Slave.java:429)
      at org.jvnet.hudson.test.JenkinsRule.createComputerLauncher(JenkinsRule.java:924)
      at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:897)
      at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:890)
      at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:796)
      at hudson.os.windows.ManagedWindowsServiceLauncherTest.configRoundTrip(ManagedWindowsServiceLauncherTest.java:43)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:548)
      at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
      at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.lang.Thread.run(Thread.java:748)
      Standard Output
      === Starting configRoundTrip(hudson.os.windows.ManagedWindowsServiceLauncherTest)
      Standard Error
      0.019 [id=101]	INFO	o.jvnet.hudson.test.JenkinsRule#createWebServer: Running on http://localhost:38541/jenkins/
      0.063 [id=108]	INFO	jenkins.InitReactorRunner$1#onAttained: Started initialization
      0.067 [id=118]	INFO	jenkins.InitReactorRunner$1#onAttained: Listed all plugins
      0.270 [id=108]	INFO	jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
      0.272 [id=131]	INFO	jenkins.InitReactorRunner$1#onAttained: Started all plugins
      0.273 [id=131]	INFO	jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
      0.584 [id=123]	INFO	jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
      0.852 [id=123]	INFO	jenkins.InitReactorRunner$1#onAttained: Completed initialization
      1.015 [id=101]	INFO	jenkins.model.Jenkins#cleanUp: Stopping Jenkins
      1.018 [id=79]	WARNING	h.u.ExceptionCatchingThreadFactory#uncaughtException: Thread Computer.threadPoolForRemoting [#1] terminated unexpectedly
      java.nio.channels.ClosedSelectorException
      at sun.nio.ch.SelectorImpl.keys(SelectorImpl.java:68)
      at org.jenkinsci.remoting.protocol.IOHub.getThreadNameBase(IOHub.java:426)
      at org.jenkinsci.remoting.protocol.IOHub.access$200(IOHub.java:69)
      at org.jenkinsci.remoting.protocol.IOHub$IOHubSelectorWatcher.run(IOHub.java:536)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      1.086 [id=101]	INFO	jenkins.model.Jenkins#cleanUp: Jenkins stopped
      

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            custom-war-packager-lib/src/main/java/io/jenkins/tools/warpackager/lib/impl/JenkinsWarPatcher.java
            http://jenkins-ci.org/commit/custom-war-packager/9a011d96e759c400cab79fc7edb640c75aeee63b
            Log:
            JENKINS-51302 - Properly cleanup Metadata so that PCT does not miss metadata for running integration tests

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: custom-war-packager-lib/src/main/java/io/jenkins/tools/warpackager/lib/impl/JenkinsWarPatcher.java http://jenkins-ci.org/commit/custom-war-packager/9a011d96e759c400cab79fc7edb640c75aeee63b Log: JENKINS-51302 - Properly cleanup Metadata so that PCT does not miss metadata for running integration tests

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            custom-war-packager-lib/src/main/java/io/jenkins/tools/warpackager/lib/impl/JenkinsWarPatcher.java
            http://jenkins-ci.org/commit/custom-war-packager/66768f511f9ba7f5f7dcc0b1d6319bc4d9ef6007
            Log:
            Merge pull request #28 from oleg-nenashev/JENKINS-51302

            JENKINS-51302 - Properly cleanup Metadata so that PCT does not miss metadata for running integration tests

            Compare: https://github.com/jenkinsci/custom-war-packager/compare/b9f7d9087153...66768f511f9b
            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: custom-war-packager-lib/src/main/java/io/jenkins/tools/warpackager/lib/impl/JenkinsWarPatcher.java http://jenkins-ci.org/commit/custom-war-packager/66768f511f9ba7f5f7dcc0b1d6319bc4d9ef6007 Log: Merge pull request #28 from oleg-nenashev/ JENKINS-51302 JENKINS-51302 - Properly cleanup Metadata so that PCT does not miss metadata for running integration tests Compare: https://github.com/jenkinsci/custom-war-packager/compare/b9f7d9087153...66768f511f9b * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/it/Makefile
            src/test/it/essentials.yml
            src/test/it/manualCheck/pom.xml
            src/test/it/manualCheck/run_pct.sh
            src/test/it/manualCheck/run_war.sh
            src/test/it/packager-config.yml
            http://jenkins-ci.org/commit/remoting/adc0df4ff783938442890f2c65bc0105ce60da96
            Log:
            JENKINS-50933 - Update patch for JENKINS-51302, remork the manual flow to Makefile

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/it/Makefile src/test/it/essentials.yml src/test/it/manualCheck/pom.xml src/test/it/manualCheck/run_pct.sh src/test/it/manualCheck/run_war.sh src/test/it/packager-config.yml http://jenkins-ci.org/commit/remoting/adc0df4ff783938442890f2c65bc0105ce60da96 Log: JENKINS-50933 - Update patch for JENKINS-51302 , remork the manual flow to Makefile
            oleg_nenashev Oleg Nenashev added a comment -

            In order to fix that, we need to reconsider the packaging approach. Instead of just replacing JARs in the WAR file, we need to rebuild the core and properly pass fields like `remoting.version` or stapler.version to the build

            oleg_nenashev Oleg Nenashev added a comment - In order to fix that, we need to reconsider the packaging approach. Instead of just replacing JARs in the WAR file, we need to rebuild the core and properly pass fields like `remoting.version` or stapler.version to the build
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/custom-war-packager/pull/38  by rarabaolaza fixes it. Will be released in 1.1

            People

              oleg_nenashev Oleg Nenashev
              oleg_nenashev Oleg Nenashev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: