You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some nullpointerException raised when decompiling some jars using jd-cli which calling jd-core;
and the error log shows as following:
case 1:
`
14 12:05:07.472 INFO com.github.kwart.jd.cli.Main - Decompiling byte-buddy-1.9.13.jar
15 12:05:07.481 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path byte-buddy-1.9.13
16 12:05:12.628 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile META-INF/versions/9/module-info
17 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.classfile.constant.ConstantUtf8.getValue()" because "cutf8" is null
18 at org.jd.core.v1.model.classfile.ConstantPool.getConstantUtf8(ConstantPool.java:39)
19 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadAttributes(ClassFileDeserializer.java:287)
20 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:108)
21 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.innerLoadClassFile(ClassFileDeserializer.java:41)
22 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:28)
23 at org.jd.core.v1.service.deserializer.classfile.DeserializeClassFileProcessor.process(DeserializeClassFileProcessor.java:27)
24 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:53)
25 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:38)
26 at com.github.kwart.jd.JavaDecompiler.decompileClass(JavaDecompiler.java:59)
27 at com.github.kwart.jd.input.ZipFileInput.lambda$decompile$2(ZipFileInput.java:112)
28 at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
========================================================================
207 12:06:57.731 INFO com.github.kwart.jd.cli.Main - Decompiling log4j-api-2.11.2.jar
208 12:06:57.740 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path log4j-api-2.11.2
209 12:07:00.094 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile META-INF/versions/9/module-info
210 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.classfile.constant.ConstantUtf8.getValue()" because "cutf8" is null
211 at org.jd.core.v1.model.classfile.ConstantPool.getConstantUtf8(ConstantPool.java:39)
212 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadAttributes(ClassFileDeserializer.java:287)
213 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:108)
214 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.innerLoadClassFile(ClassFileDeserializer.java:41)
215 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:28)
216 at org.jd.core.v1.service.deserializer.classfile.DeserializeClassFileProcessor.process(DeserializeClassFileProcessor.java:27)
217 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:53)
218 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:38)
219 at com.github.kwart.jd.JavaDecompiler.decompileClass(JavaDecompiler.java:59)
220 at com.github.kwart.jd.input.ZipFileInput.lambda$decompile$2(ZipFileInput.java:112) and case 2:
476 12:09:48.354 INFO com.github.kwart.jd.cli.Main - Decompiling tomcat-embed-core-9.0.21.jar
477 12:09:48.364 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path tomcat-embed-core-9.0.21
478 12:09:59.390 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile org/apache/tomcat/util/net/Nio2Endpoint
479 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.javasyntax.type.ObjectType.hashCode()" because "this.outerType" is nu ll
480 at org.jd.core.v1.model.javasyntax.type.InnerObjectType.hashCode(InnerObjectType.java:82)
481 at java.base/java.util.ArrayList.hashCodeRange(ArrayList.java:595)
482 at java.base/java.util.ArrayList.hashCode(ArrayList.java:582)
483 at org.jd.core.v1.model.javasyntax.type.ObjectType.hashCode(ObjectType.java:192)
484 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.searchSuperParameterizedType(TypeMaker.java:907)
485 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.searchSuperParameterizedType(TypeMaker.java:975)
486 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.isAssignable(TypeMaker.java:888)
487 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.updateExpression(AddCastExpressionVisi tor.java:355)
488 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.updateExpressions(AddCastExpressionVis itor.java:327)
489 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.visit(AddCastExpressionVisitor.java:24 4)
490 at org.jd.core.v1.model.javasyntax.expression.MethodInvocationExpression.accept(MethodInvocationExpression.java:58)
491 at org.jd.core.v1.model.javasyntax.AbstractJavaSyntaxVisitor.visit(AbstractJavaSyntaxVisitor.java:479)
492 at org.jd.core.v1.model.javasyntax.statement.ExpressionStatement.accept(ExpressionStatement.java:29)
`
The text was updated successfully, but these errors were encountered:
hello! i have a similar problem.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.classfile.ClassFile.getAccessFlags()" because "classFile" is null
at org.jd.core.v1.service.converter.classfiletojavasyntax.processor.ConvertClassFileProcessor.process(ConvertClassFileProcessor.java:63)
Have you solved the problem yet?
yaojieno1
pushed a commit
to yaojieno1/jd-core
that referenced
this issue
Feb 20, 2024
some nullpointerException raised when decompiling some jars using jd-cli which calling jd-core;
and the error log shows as following:
case 1:
`
14 12:05:07.472 INFO com.github.kwart.jd.cli.Main - Decompiling byte-buddy-1.9.13.jar
15 12:05:07.481 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path byte-buddy-1.9.13
16 12:05:12.628 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile META-INF/versions/9/module-info
17 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.classfile.constant.ConstantUtf8.getValue()" because "cutf8" is null
18 at org.jd.core.v1.model.classfile.ConstantPool.getConstantUtf8(ConstantPool.java:39)
19 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadAttributes(ClassFileDeserializer.java:287)
20 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:108)
21 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.innerLoadClassFile(ClassFileDeserializer.java:41)
22 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:28)
23 at org.jd.core.v1.service.deserializer.classfile.DeserializeClassFileProcessor.process(DeserializeClassFileProcessor.java:27)
24 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:53)
25 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:38)
26 at com.github.kwart.jd.JavaDecompiler.decompileClass(JavaDecompiler.java:59)
27 at com.github.kwart.jd.input.ZipFileInput.lambda$decompile$2(ZipFileInput.java:112)
28 at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
========================================================================
207 12:06:57.731 INFO com.github.kwart.jd.cli.Main - Decompiling log4j-api-2.11.2.jar
208 12:06:57.740 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path log4j-api-2.11.2
209 12:07:00.094 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile META-INF/versions/9/module-info
210 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.classfile.constant.ConstantUtf8.getValue()" because "cutf8" is null
211 at org.jd.core.v1.model.classfile.ConstantPool.getConstantUtf8(ConstantPool.java:39)
212 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadAttributes(ClassFileDeserializer.java:287)
213 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:108)
214 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.innerLoadClassFile(ClassFileDeserializer.java:41)
215 at org.jd.core.v1.service.deserializer.classfile.ClassFileDeserializer.loadClassFile(ClassFileDeserializer.java:28)
216 at org.jd.core.v1.service.deserializer.classfile.DeserializeClassFileProcessor.process(DeserializeClassFileProcessor.java:27)
217 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:53)
218 at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:38)
219 at com.github.kwart.jd.JavaDecompiler.decompileClass(JavaDecompiler.java:59)
220 at com.github.kwart.jd.input.ZipFileInput.lambda$decompile$2(ZipFileInput.java:112)
and case 2:
476 12:09:48.354 INFO com.github.kwart.jd.cli.Main - Decompiling tomcat-embed-core-9.0.21.jar
477 12:09:48.364 INFO com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path tomcat-embed-core-9.0.21
478 12:09:59.390 ERROR com.github.kwart.jd.JavaDecompiler - Can't decompile org/apache/tomcat/util/net/Nio2Endpoint
479 java.lang.NullPointerException: Cannot invoke "org.jd.core.v1.model.javasyntax.type.ObjectType.hashCode()" because "this.outerType" is nu ll
480 at org.jd.core.v1.model.javasyntax.type.InnerObjectType.hashCode(InnerObjectType.java:82)
481 at java.base/java.util.ArrayList.hashCodeRange(ArrayList.java:595)
482 at java.base/java.util.ArrayList.hashCode(ArrayList.java:582)
483 at org.jd.core.v1.model.javasyntax.type.ObjectType.hashCode(ObjectType.java:192)
484 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.searchSuperParameterizedType(TypeMaker.java:907)
485 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.searchSuperParameterizedType(TypeMaker.java:975)
486 at org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker.isAssignable(TypeMaker.java:888)
487 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.updateExpression(AddCastExpressionVisi tor.java:355)
488 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.updateExpressions(AddCastExpressionVis itor.java:327)
489 at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.AddCastExpressionVisitor.visit(AddCastExpressionVisitor.java:24 4)
490 at org.jd.core.v1.model.javasyntax.expression.MethodInvocationExpression.accept(MethodInvocationExpression.java:58)
491 at org.jd.core.v1.model.javasyntax.AbstractJavaSyntaxVisitor.visit(AbstractJavaSyntaxVisitor.java:479)
492 at org.jd.core.v1.model.javasyntax.statement.ExpressionStatement.accept(ExpressionStatement.java:29)
`
The text was updated successfully, but these errors were encountered: