Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-53823] - Update JTH and commons-io to fix JDK11 compatibility issues #3661

Closed
wants to merge 13 commits into from

Conversation

oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented Sep 28, 2018

See JENKINS-53823. My plan is to pick up jenkinsci/jenkins-test-harness#110 , but effectively it integrates a lot of other changes. I have not tested HTMLUnit from the last release, but should be ok.

Proposed changelog entries

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@dwnusbaum @jglick

@oleg-nenashev oleg-nenashev added the java11 Java 11 support in Jenkins label Sep 28, 2018
@oleg-nenashev
Copy link
Member Author

Apache Commons IO 2.6 adds a patch for Java 9+ compatibility: "IO-551: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.". So I decided to just update the version to resolve upper bounds

@dwnusbaum
Copy link
Member

dwnusbaum commented Sep 28, 2018

Looks like the HTMLUnit update breaks ZipExtractionInstallerTest, but only on Windows?

@oleg-nenashev
Copy link
Member Author

Does not look like platform-specific issue. Maybe Unix tests got interrupted.
Anyway, it looks that the new HtmlUnit breaks binary compatibility of JTH. Not surprising, not the first time. I believe we should just fix the tests if it is not a big deal

CC @uhafner who contributed jenkinsci/jenkins-test-harness#103

20:14:25 [Windows] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\hudson\tools\ZipExtractionInstallerTest.java:[27,36] error: cannot find symbol
20:14:25 [Windows] [ERROR]   symbol:   class InteractivePage
20:14:25 [Windows] [ERROR]   location: package com.gargoylesoftware.htmlunit
20:14:25 [Windows] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\hudson\tools\ZipExtractionInstallerTest.java:[151,35] error: cannot find symbol
20:14:25 [Windows] [ERROR]   symbol:   class InteractivePage
20:14:25 [Windows] [ERROR]   location: class ZipExtractionInstallerTest.SpyingJavaScriptEngine
20:14:25 [Windows] [ERROR] -> [Help 1]
20:14:25 [Windows] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile (default-testCompile) on project jenkins-test: Compilation failure
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
20:14:25 [Windows]     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
20:14:25 [Windows]     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
20:14:25 [Windows]     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
20:14:25 [Windows]     at java.lang.reflect.Method.invoke (Method.java:498)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
20:14:25 [Windows] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
20:14:25 [Windows]     at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1038)
20:14:25 [Windows]     at org.apache.maven.plugin.compiler.TestCompilerMojo.execute (TestCompilerMojo.java:172)
20:14:25 [Windows]     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
20:14:25 [Windows]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
20:14:25 [Windows]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
20:14:25 [Windows]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
20:14:25 [Windows]     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
20:14:25 [Windows]     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
20:14:25 [Windows]     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
20:14:25 [Windows]     at java.lang.reflect.Method.invoke (Method.java:498)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
20:14:25 [Windows]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
20:14:25 [Windows] [ERROR] 
20:14:25 [Windows] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
20:14:25 [Windows] [ERROR] 
20:14:25 [Windows] [ERROR] For more information about the errors and possible solutions, please read the following articles:
20:14:25 [Windows] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
20:14:25 [Windows] [ERROR] 
20:14:25 [Windows] [ERROR] After correcting the problems, you can resume the build with the command
20:14:25 [Windows] [ERROR]   mvn <goals> -rf :jenkins-test

@jglick
Copy link
Member

jglick commented Sep 28, 2018

Apparently you need to s/InteractivePage/HtmlPage/g for whatever reason.

@oleg-nenashev
Copy link
Member Author

12:03:17 [Windows-jdk8] [INFO] BUILD FAILURE
12:03:17 [Windows-jdk8] [INFO] ------------------------------------------------------------------------
12:03:17 [Windows-jdk8] [INFO] Total time: 07:08 min
12:03:17 [Windows-jdk8] [INFO] Finished at: 2018-09-30T12:03:16Z
12:03:17 [Windows-jdk8] [INFO] ------------------------------------------------------------------------
12:03:17 [Windows-jdk8] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:testCompile (default-testCompile) on project jenkins-test: Compilation failure: Compilation failure: 
12:03:17 [Windows-jdk8] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\hudson\model\ComputerTest.java:[109,66] error: incompatible types: String cannot be converted to Charset
12:03:17 [Windows-jdk8] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\jenkins\security\RekeySecretAdminMonitorTest.java:[135,19] error: cannot find symbol
12:03:17 [Windows-jdk8] [ERROR]   symbol:   method <HtmlButton>getHtmlElementsByTagName(String)
12:03:17 [Windows-jdk8] [ERROR]   location: variable form of type HtmlForm
12:03:17 [Windows-jdk8] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\lib\form\PasswordTest.java:[151,39] error: no suitable method found for toString(Charset)
12:03:17 [Windows-jdk8] [ERROR]     method ByteArrayOutputStream.toString(String) is not applicable
12:03:17 [Windows-jdk8] [ERROR]       (argument mismatch; Charset cannot be converted to String)
12:03:17 [Windows-jdk8] [ERROR]     method ByteArrayOutputStream.toString(int) is not applicable
12:03:17 [Windows-jdk8] [ERROR]       (argument mismatch; Charset cannot be converted to int)
12:03:17 [Windows-jdk8] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\lib\form\PasswordTest.java:[174,37] error: no suitable method found for toString(Charset)
12:03:17 [Windows-jdk8] [ERROR]     method ByteArrayOutputStream.toString(String) is not applicable
12:03:17 [Windows-jdk8] [ERROR]       (argument mismatch; Charset cannot be converted to String)
12:03:17 [Windows-jdk8] [ERROR]     method ByteArrayOutputStream.toString(int) is not applicable
12:03:17 [Windows-jdk8] [ERROR]       (argument mismatch; Charset cannot be converted to int)
12:03:17 [Windows-jdk8] [ERROR] C:\Jenkins\workspace\Core_jenkins_PR-3661-RHTNFCSX5YLOKSMX32LCF7BQQS4ZA7VLHUBL4NTQV4LH5ABTFUUQ\test\src\test\java\hudson\model\ViewTest.java:[234,52] error: cannot find symbol
12:03:17 [Windows-jdk8] [ERROR]   symbol:   method getContent()
12:03:17 [Windows-jdk8] [ERROR]   location: class XmlPage
12:03:17 [Windows-jdk8] [ERROR] -> [Help 1]

@oleg-nenashev oleg-nenashev changed the title [JENKINS-53823] - Update JTH from 2.36 to 2.42 to fix JDK11 compatibility issues [JENKINS-53823] - Update JTH and commons-io to fix JDK11 compatibility issues Oct 2, 2018
@jglick jglick added the work-in-progress The PR is under active development, not ready to the final review label Oct 4, 2018
@oleg-nenashev oleg-nenashev added on-hold This pull request depends on another event/release, and it cannot be merged right now and removed java11 Java 11 support in Jenkins work-in-progress The PR is under active development, not ready to the final review labels Nov 24, 2018
@Wadeck Wadeck removed their request for review January 7, 2019 08:23
@batmat batmat self-requested a review January 9, 2019 23:13
@oleg-nenashev
Copy link
Member Author

I believe this is superceded by #3872 o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold This pull request depends on another event/release, and it cannot be merged right now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants