Unexpected error while performing partial evaluation
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
Hello,
im tring to run proguard on my code but im always getting errors
now it's
ProGuard, version 5.3.2
Reading program jar [C:\Users\program.jar] (filtered)
Reading library jar [C:\Program Files\Java\jre1.8.0_111\lib\rt.jar]
Reading library jar [C:\Program Files\Java\jre1.8.0_111\lib\jsse.jar]
Reading library jar [C:\Program Files\Java\jre1.8.0_111\lib\ext\jfxrt.jar]
Reading library jar [C:\Program Files\Java\jre1.8.0_111\lib\javaws.jar]
Reading library jar [C:\Program Files\Java\jre1.8.0_111\lib\jce.jar]
Unexpected error while performing partial evaluation:
Class = [ch/qos/logback/core/status/ViewStatusMessagesServletBase]
Method = [printList(Ljava/lang/StringBuilder;Lch/qos/logback/core/status/StatusManager;)V]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [ch/qos/logback/core/status/ViewStatusMessagesServletBase] (with 1 known uper classes) and [java/lang/StringBuilder] (with 3 known super classes))
Error: Can't find common super class of [ch/qos/logback/core/status/ViewStatusMessagesServletBase] (with 1 known super classes) and [java/lang/StringBuilder] (with 3 known super classes)
tried many things.
this is my config file after many changes:
-libraryjars "<java.home>/lib/rt.jar"
-libraryjars "<java.home>/lib/jsse.jar"
-libraryjars "<java.home>/lib/ext/jfxrt.jar"
-libraryjars "<java.home>/lib/javaws.jar"
-libraryjars "<java.home>/lib/jce.jar"
-injars program.jar(!proguard/ant/**,!proguard/gradle/**,!proguard/wtk/**)
-outjars pro_program.jar
-classobfuscationdictionary obfuscationClassNames.txt
-dontshrink
-printmapping "Maping function to function.map"
-target 8
-optimizations !class/unboxing/enum
-dontskipnonpubliclibraryclassmembers
-dontskipnonpubliclibraryclass
-dontobfuscate
-dontpreverify
-dontnote **
-repackageclasses
-flattenpackagehierarchy ''
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod,EventHandler,Override
-adaptresourcefilecontents **.fxml,**.properties,META-INF/MANIFEST.MF
-keepclasseswithmembers public class application.Main {
public static void main(java.lang.String[]);
}
-keepclassmembernames class * {
@javafx.fxml.FXML *;
}
# Don't obfuscate or remove your entry point
-keep public class application.Main {
public static void main(java.lang.String[]);
public void start(javafx.stage.Stage);
}
-keepclassmembers public class dps.** {
public javafx.beans.property.SimpleStringProperty *Property();
}
-keepclassmembers class * {
private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
}
-keep class java.lang.StringBuilder { *; }
-keep class dps.utils.gui.MyTableView { *; }
-keep class javax.crypto.** { *; }
-keep class org.apache.commons.logging.** { *; }
-keep class dps.application.** { *; }
-keep class com.** { *; }
-keep class lynden.gmapsfx.** { *; }
-keep class POGOProtos.** { *; }
-keep class okhttp3.** { *; }
-keep class svarzee.** { *; }
-keep class org.slf4j.** { *; }
-keep class org.apache.* { *; }
-keep interface org.apache.**
##############################################################################
##############################################################################
##############################################################################
-dontwarn org.joda.convert.**
-dontwarn com.google.**
-dontwarn dps.utils.cypher.Cypher
-dontwarn org.apache.**
-dontwarn com.squareup.**
-dontwarn okhttp3.internal.**
-dontwarn okio.**
-dontwarn ch.qos.logback.**
-dontwarn org.slf4j.**
i don't know where i'm wrong.
please help.
thanks
BTW,
removing -optimization... will cause proguard to finished it's job but when running the output jar Im receiving that error:
Last edit: Shai Cohen 2016-12-31
You're suppressing warnings about unresoved references with -dontwarn, notably for ch.qos.logback. This can cause problems while processing the code. You should try removing this line and solve the reported issue instead. The Logback library depends on some other library (maybe the servlet library) that is missing. The resulting unresolved reference hinders a proper analysis in the optimization step.
Alternatively, you could try filtering out the offending Logback class from the input.
Alternatively, you could try to enable the shrinking step, so classes with unresolved references are (hopefully) removed before the optimization step.