cfr icon indicating copy to clipboard operation
cfr copied to clipboard

CFR can't handle recent Oracle JDBC jars

Open dan-blum opened this issue 1 year ago • 1 comments

CFR version

CFR 0.152

Compiler

javac 17.0.4.1

Description

When run on an OJDBC8 jar file - for example, ojdbc8-21.1.0.0.jar - CFR produces java.lang.NullPointerException: Cannot invoke "java.io.File.getCanonicalPath()" because the return value of "java.io.File.getParentFile()" is null org.benf.cfr.reader.state.ClassFileSourceImpl.addToRelativeClassPath(ClassFileSourceImpl.java:371) org.benf.cfr.reader.state.ClassFileSourceImpl.addJarContent(ClassFileSourceImpl.java:270) org.benf.cfr.reader.state.DCCommonState.explicitlyLoadJar(DCCommonState.java:141) org.benf.cfr.reader.Driver.doJar(Driver.java:127) org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76) org.benf.cfr.reader.Main.main(Main.java:54)

It's not an issue with my filesystem because it works fine on other jars (including older Oracle JDBC jars) in the same directory.

dan-blum avatar Oct 06 '23 19:10 dan-blum

Had the same issue with another jar. Simply unjar the original jar into a new folder then rebuild it using "jar cvf ...", then use the new rebuilt jar file.

gbulfon avatar May 30 '24 09:05 gbulfon