Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR report when decompiling some jars #75

Open
netmany opened this issue Jan 10, 2023 · 1 comment
Open

ERROR report when decompiling some jars #75

netmany opened this issue Jan 10, 2023 · 1 comment

Comments

@netmany
Copy link

netmany commented Jan 10, 2023

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)
`

@XingYuanWei
Copy link

XingYuanWei commented Feb 13, 2023

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
Bumps [joda-time](https://github.com/JodaOrg/joda-time) from 2.12.2 to 2.12.3.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](JodaOrg/joda-time@2.12.2...v2.12.3)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants