Java version: JDK 11.0.11
ClassGraph version: 4.8.47
Hey, I found a really tricky issue in our team code when we tried to upgrade from JDK8 to JDK11.
The error as in the title happened when we tried to scan the classes under certain package prefix.
Below is the code we run and the error logs.
ScanResult result = new ClassGraph().enableAllInfo().verbose()
.whitelistPackages(prefix).scan();
[java] 2021-06-06T16:58:06.424-0400 ClassGraph ------------ Found classfile within whitelisted package: s3/heart/activities/ExecutionEnvironment.class
[java] 2021-06-06T16:58:06.517-0400 ClassGraph -------------- Parsing classfile (took 0.008992 sec)
[java] 2021-06-06T16:58:06.526-0400 ClassGraph ---------------- Invalid classfile: Unknown constant pool tag 17 (element size unknown, cannot continue reading class). Please report this at https://github.com/classgraph/classgraph/issues
The tricky thing is, it only happened when we tried to use JDK11 and scan cross Jars. It works totally fine if we are using JDK8 or if we only scan inside the same jar which ClassGraph sits. Wondering do you have any clue? If it requires to upgrade ClassGraph, we need to talk to other teams to do it. Anything we can try out before that? Thanks!
Best
Java version: JDK 11.0.11
ClassGraph version: 4.8.47
Hey, I found a really tricky issue in our team code when we tried to upgrade from JDK8 to JDK11.
The error as in the title happened when we tried to scan the classes under certain package prefix.
Below is the code we run and the error logs.
The tricky thing is, it only happened when we tried to use JDK11 and scan cross Jars. It works totally fine if we are using JDK8 or if we only scan inside the same jar which ClassGraph sits. Wondering do you have any clue? If it requires to upgrade ClassGraph, we need to talk to other teams to do it. Anything we can try out before that? Thanks!
Best