Bug 62126 - Build fails with java.lang.NullPointerException with openjdk9
Summary: Build fails with java.lang.NullPointerException with openjdk9
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 4.0
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: JDK9
Depends on:
Blocks:
 
Reported: 2018-02-23 05:45 UTC by Faiz Akhtar
Modified: 2019-03-03 14:24 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Faiz Akhtar 2018-02-23 05:45:25 UTC
Hello,
I am trying to build Jmeter 4_0 from source with Openjdk9 on Ubuntu 17.10 platform. Build is failing with below error:

Buildfile: /root/apache-jmeter-4.0/build.xml

_check_3rdparty:

_message_3rdParty:

init-version:
     [echo] jmeter.version = 4.0
     [echo] display.version = 4.0.20180223
     [echo] implementation.version = 4.0.20180223

compile-jorphan:
    [javac] Compiling 61 source files to /root/apache-jmeter-4.0/build/jorphan
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.8
    [javac] 1 warning
    [javac] An exception has occurred in the compiler (9-Ubuntu). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
    [javac] java.lang.NullPointerException
    [javac]     at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.getVersionMap(JarFileSystem.java:137)
    [javac]     at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.createVersionedLinks(JarFileSystem.java:112)
    [javac]     at jdk.zipfs/jdk.nio.zipfs.JarFileSystem.<init>(JarFileSystem.java:85)
    [javac]     at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:134)
    [javac]     at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:517)
    [javac]     at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:319)
    [javac]     at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:715)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:722)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:655)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:526)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:293)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1120)
    [javac]     at jdk.compiler/com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:810)
    [javac]     at jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:344)
    [javac]     at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529)
    [javac]     at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:285)
    [javac]     at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:300)
    [javac]     at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:570)
    [javac]     at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:554)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1052)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:923)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:302)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:162)
    [javac]     at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
    [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [javac]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    [javac]     at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:58)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1408)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1134)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
    [javac]     at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    [javac]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [javac]     at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:435)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
    [javac]     at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
    [javac]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
    [javac]     at org.apache.tools.ant.Main.runBuild(Main.java:857)
    [javac]     at org.apache.tools.ant.Main.startAnt(Main.java:236)
    [javac]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
    [javac]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)

BUILD FAILED


steps followed:
installed openjdk-9-jdk
wget http://redrockdigimark.com/apachemirror//jmeter/source/apache-jmeter-4.0_src.zip
unzip apache-jmeter-4.0_src.zip
cd apache-jmeter-4.0
ant download_jars
ant

Tried with 
git clone http://git.apache.org/jmeter.git
git checkout v4_0

Ref:  http://jmeter.apache.org/download_jmeter.cgi

Please let me know if i'm missing anything here.
Comment 2 Faiz Akhtar 2018-02-26 06:13:32 UTC
Thanks
Comment 3 Philippe Mouawad 2019-03-03 14:24:32 UTC
Java bug fixed in Java 11 since few months now.