Invalid classfile: Unknown constant pool tag 17 (element size unknown, cannot continue reading class)
See original GitHub issueJava 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Throw Unknown constant pool tag when upgrade to 2.10.0
RuntimeException: Unknown constant pool tag [I@d105805e in classfile module-info.class (element size unknown, cannot continue reading class.
Read more >Corda 3: java.lang.RuntimeException: Unknown constant pool ...
RuntimeException: Unknown constant pool tag [I@4b4ed4ba in classfile module-info.class (element size unknown, cannot continue reading class.
Read more >Failed to scan the classpath Unknown constant pool tag for ...
RuntimeException: Unknown constant pool tag [I@ee0b393 in classfile module-info.class (element size unknown, cannot continue reading class.
Read more >Unknown constant pool entry tag at offset Error message ... - IBM
This issue occurs if the class file was compiled with Java version on Windows XP (32 bit) machine and executed on Windows 2003...
Read more >Chapter 4. The class File Format - Oracle Help Center
This chapter describes the Java Virtual Machine class file format. ... In retrospect, making 8-byte constants take two constant pool entries was a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, Luke. Just FYI. Your commit fixed the issue!
Thanks a lot, this is really quick reply! I would like to try version 4.8.108!