Closed bjhargrave closed 8 years ago
A more traditional stacktrace:
12:16:07.241 [DEBUG] [aQute.bnd.build.ProjectBuilder] Exception
java.lang.NullPointerException
at aQute.bnd.differ.JavaElement.classElement(JavaElement.java:213)
at aQute.bnd.differ.JavaElement$1.inherit(JavaElement.java:310)
at aQute.bnd.differ.JavaElement$1.extendsClass(JavaElement.java:281)
at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:655)
at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:496)
at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:485)
at aQute.bnd.differ.JavaElement.classElement(JavaElement.java:233)
at aQute.bnd.differ.JavaElement.<init>(JavaElement.java:150)
at aQute.bnd.differ.JavaElement.getAPI(JavaElement.java:160)
at aQute.bnd.differ.DiffPluginImpl.bundleElement(DiffPluginImpl.java:131)
at aQute.bnd.differ.DiffPluginImpl.tree(DiffPluginImpl.java:114)
at aQute.bnd.differ.DiffPluginImpl.tree(DiffPluginImpl.java:106)
at aQute.bnd.differ.Baseline.baseline(Baseline.java:85)
at aQute.bnd.build.ProjectBuilder.doBaseline(ProjectBuilder.java:168)
at aQute.bnd.osgi.Builder.build(Builder.java:155)
at aQute.bnd.osgi.Builder.builds(Builder.java:1292)
at aQute.bnd.build.ProjectBuilder.builds(ProjectBuilder.java:546)
at aQute.bnd.build.Project.buildLocal(Project.java:1734)
at aQute.bnd.build.Project.build(Project.java:1544)
at aQute.bnd.build.Project.build(Project.java:2051)
FWIW, the Analyzer seems to parse the class files fine. It is code used by the baseliner which fails.
This is caused by the fact that we cannot load the resource of Object.class in Java 9 due to protection
It is reported that Bnd does not work on Java 9: https://docs.gradle.org/current/release-notes?_ga=1.40411690.988608058.1455920730#initial-java-9-support. So I went to test build bnd with Java 9.
You will need to remove
-XX:MaxPermSize=512m
fromgradle.properties
to run./gradlew
under Java 9.The build fails with an error in the baseliner:
(I had to hack the build script to get the above information:
)