NPE generating a scan

the error says to report it here;

BUILD SUCCESSFUL in 16s
3 actionable tasks: 2 executed, 1 up-to-date

A build scan cannot be produced as an error occurred gathering build data.
Please report this problem via Help | Gradle Enterprise and include the following via copy/paste:


Gradle version: 6.8.1
Plugin version: 3.5

java.lang.NullPointerException
at com.gradle.scan.plugin.internal.i.a.b(SourceFile:93)
at com.gradle.scan.plugin.internal.b.t.b.a(SourceFile:72)
at com.gradle.scan.plugin.internal.b.t.b.a(SourceFile:45)
at com.gradle.scan.plugin.internal.b.g.c.a(SourceFile:30)
at com.gradle.scan.plugin.internal.b.g.b.a(SourceFile:62)
at com.gradle.scan.plugin.internal.b.g.b.a(SourceFile:48)
at .progress(Unknown Source)
at com.gradle.scan.plugin.internal.l.a$b.a(SourceFile:108)
at com.gradle.scan.plugin.internal.l.a$b.progress(SourceFile:98)
at com.gradle.scan.plugin.internal.l.a.a(SourceFile:60)
at com.gradle.scan.plugin.internal.l.l.a(SourceFile:44)
at com.gradle.scan.plugin.internal.l.c.a(SourceFile:84)
at com.gradle.scan.plugin.internal.l.g.a(SourceFile:45)
at .accept(Unknown Source)
at com.gradle.scan.plugin.internal.r.a$a.a(SourceFile:31)
at com.gradle.scan.plugin.internal.r.a$a.a(SourceFile:20)
at com.gradle.scan.plugin.internal.r.a.c(SourceFile:67)
at .run(Unknown Source)

I was trying to debug why I was getting a reflection error when trying to integrate sonarqube.

2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/cal.taylor@ibm.com/.gradle/wrapper/dists/gradle-6.8.1-bin/a3ijn718agivfn4m4c5tfgx2i/gradle-6.8.1/lib/groovy-all-1.3-2.5.12.jar) to method java.util.AbstractCollection.finishToArray(java.lang.Object,java.util.Iterator)

2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass

Thank you for your consideration. My plan is to try to get gradle to swallow the system.err. I have an absurdly large project structure with a master project and another that get added to the build via settings.gradle. I think this structure is part of the problem, but I need to be sure before I propose changes.

Hi,

Thanks for reporting it here.

Do you use the IBM Semeru runtime to run Gradle? If so, can you upgrade to the latest Gradle Enterprise Gradle plugin 3.8.1 and try again?

If not what JDK version and distribution do you use ? Can you paste the output of gradle -v and java -version here ?

Regards,

Guy

Hi,

Thanks for responding.

I don’t knowingly run Semeru, but that might be an external name for the runtimes IBM has me using, I’m an IBM employee and we have to use their own runtimes/jdk. It turns out that seems to be the case.

*[QRADAR-12221-upgradling-7][~/IdeaProjects/dsms75/scanners]$ ../master/gradlew -v

------------------------------------------------------------
Gradle 6.8.1
------------------------------------------------------------

Build time:   2021-01-22 13:20:08 UTC
Revision:     31f14a87d93945024ab7a78de84102a3400fa5b2

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          11.0.13 (Eclipse OpenJ9 openj9-0.29.0)
OS:           Mac OS X 12.2.1 x86_64
[QRADAR-12242-dsmcommon-script-error][~/IdeaProjects/dsms74/dsms/cisco-acs]$ java --version
java 11.0.13 2021-10-19
IBM Semeru Runtime Certified Edition 11.0.13.0 (build 11.0.13+8)
Eclipse OpenJ9 VM 11.0.13.0 (build openj9-0.29.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20211025_175 (JIT enabled, AOT enabled)
OpenJ9   - e1e72c497
OMR      - 299b6a2d2
JCL      - 43ed76284c based on jdk-11.0.13+8)

Ok thanks for the info. There was an issue with OpenJ9 version 0.29.0 that caused downstream errors on our end. You’d need to upgrade your IBM Semeru runtime to a version that is based on OpenJ9 version 0.30.0 such that this issue is fixed. As shown on this page, it must be 11.0.14.0 or later that you need to install.

thanks for your help, my issues are resolved. properly setting JAVA_HOME updates the java -version

1 Like