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

NoClassDefFoundError when decompiling using IBM Java #29

Open
kwart opened this issue Jan 29, 2020 · 0 comments
Open

NoClassDefFoundError when decompiling using IBM Java #29

kwart opened this issue Jan 29, 2020 · 0 comments
Labels

Comments

@kwart
Copy link
Member

kwart commented Jan 29, 2020

Unexpected failure on IBM Java:

josef@josef-nb:~/java/ibm-java-x86_64-80$ jd-cli -n -od /tmp/ibm-src jre/lib/ibmpkcs.jar 
13:41:43.595 INFO  com.github.kwart.jd.cli.Main - Decompiling jre/lib/ibmpkcs.jar
13:41:43.602 INFO  com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path /tmp/ibm-src
Exception in thread "main" java.lang.NoClassDefFoundError: javax.mail.internet.MimeMessage
	at java.lang.VMAccess.findClassOrNull(Native Method)
	at java.lang.VMAccess.findClassOrNullHelper(VMAccess.java:55)
	at com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:81)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:925)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:888)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:932)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:888)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:871)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.util.ObjectTypeMaker.loadFromClassLoader(ObjectTypeMaker.java:134)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.util.ObjectTypeMaker.unsafeMake(ObjectTypeMaker.java:77)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.util.ObjectTypeMaker.make(ObjectTypeMaker.java:56)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.util.LocalVariableMaker.initLocalVariablesFromAttributes(LocalVariableMaker.java:193)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.util.LocalVariableMaker.<init>(LocalVariableMaker.java:95)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.CreateInstructionsVisitor.visit(CreateInstructionsVisitor.java:92)
	at org.jd.core.v1.model.javasyntax.declaration.MethodDeclaration.accept(MethodDeclaration.java:125)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.CreateInstructionsVisitor.visit(CreateInstructionsVisitor.java:72)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.UpdateJavaSyntaxTreeVisitor.visit(UpdateJavaSyntaxTreeVisitor.java:59)
	at org.jd.core.v1.model.javasyntax.declaration.BodyDeclaration.accept(BodyDeclaration.java:29)
	at org.jd.core.v1.model.javasyntax.AbstractJavaSyntaxVisitor.safeAccept(AbstractJavaSyntaxVisitor.java:591)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.visitor.UpdateJavaSyntaxTreeVisitor.visit(UpdateJavaSyntaxTreeVisitor.java:76)
	at org.jd.core.v1.model.javasyntax.declaration.ClassDeclaration.accept(ClassDeclaration.java:33)
	at org.jd.core.v1.model.javasyntax.AbstractJavaSyntaxVisitor.visit(AbstractJavaSyntaxVisitor.java:23)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.processor.UpdateJavaSyntaxTreeProcessor.process(UpdateJavaSyntaxTreeProcessor.java:32)
	at org.jd.core.v1.service.converter.classfiletojavasyntax.ClassFileToJavaSyntaxProcessor.process(ClassFileToJavaSyntaxProcessor.java:40)
	at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:54)
	at org.jd.core.v1.ClassFileToJavaSourceDecompiler.decompile(ClassFileToJavaSourceDecompiler.java:38)
	at com.github.kwart.jd.JavaDecompiler.decompileClass(JavaDecompiler.java:58)
	at com.github.kwart.jd.input.ZipFileInput.decompile(ZipFileInput.java:86)
	at com.github.kwart.jd.cli.Main.main(Main.java:98)

The same file with OpenJDK:

$ jd-cli -n -od /tmp/ibm-src jre/lib/ibmpkcs.jar
13:42:36.947 INFO  com.github.kwart.jd.cli.Main - Decompiling jre/lib/ibmpkcs.jar
13:42:36.951 INFO  com.github.kwart.jd.output.DirOutput - Directory output will be initialized for path /tmp/ibm-src
13:42:38.639 INFO  com.github.kwart.jd.output.DirOutput - Finished with 329 class file(s) and 1 resource file(s) written.
@kwart kwart added the bug label Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant