proguard: Can't find common super class of org/apache/poi/hpbf/extractor/PublisherTextExtractor

非 Y 不嫁゛ 提交于 2021-01-29 19:25:14

问题


I am building a desktop application (using OpenJDK11, Maven). I am using ProGuard with the following config:

@proguard_jmods.cfg
    #-dontshrink
    -dontoptimize
    #-dontobfuscate
    -optimizations !class/unboxing/enum
    -repackageclasses ''
    -renamesourcefileattribute SourceFile
    -keepattributes *Annotation*,Signature,Annotation,InnerClasses,EnclosingMethod,SourceFile,LineNumberTable
    -adaptresourcefilenames
    -dontnote
    -dontwarn com.ctc.wstx.**,com.github.**,com.jolbox.bonecp.**,com.mchange.v2.**,com.sun.istack.**,com.sun.tools.**,com.healthmarketscience.**,com.healthmarketscience.**,org.codehaus.**,org.iq80.snappy.**,com.sun.xml.**,com.thoughtworks.xstream.**,de.l3s.boilerpipe.**,javax.activation.**,javax.transaction.**,net.sf.ehcache.**,opennlp.tools.util.**,org.apache.cxf.**,org.apache.log4j.**,org.apache.poi.**,org.apache.sis.**,org.apache.**,org.dom4j.**,org.codehaus.plexus.**,javax.enterprise.**,org.glassfish.**,org.jdesktop.**,org.quartz.**,com.sun.org.**,javax.imageio.metadata.**,javax.xml.**,javax.jws.**,org.w3c.dom.**,org.xml.sax.**,au.com.bytecode.**,com.fasterxml.jackson.**,com.google.common.**,com.google.gson.**,com.googlecode.mp4parser.**,com.itextpdf.**,com.mchange.v1.**,com.microsoft.schemas.**,com.strobel.assembler.**,com.strobel.compilerservices.**,examples.RCallerScriptEngineExample1.**,examples.RCallerScriptEngineExample2.**,examples.RCallerScriptEngineExample2.**,examples.RCallerScriptEngineExample3.**,javassist.util.HotSwapAgent.**,javassist.util.HotSwapper.**,javax.rmi.CORBA.**,javax.rmi.CORBA.**,javax.rmi.PortableRemoteObject.**,org.bouncycastle.**,org.cyberneko.**,org.eclipse.jetty.**,org.etsi.uri.**,org.jboss.com.**,org.jdom2.**,org.jfree.**,org.joda.time.**,org.terracotta.quartz.**,ucar.nc2.grib.**,javax.imageio.metadata.**,com.jmatio.io.**,javax.script.**,com.sun.**,java.rmi.**,opennlp.tools.sentiment.**,java.lang.**,java.util.**,sun.misc.Unsafe.**,sun.**,org.w3.**,net.sf.ehcache.distribution.**,org.apache.http.**,org.apache.any23.**,com.graphbuilder.curve.**,com.strobel.decompiler.**,com.uwyn.jhighlight.**,rg.codehaus.stax2.**,org.openxmlformats.schemas.**,org.springframework.**,org.slf4j.**,com.mysql.**,org.pushingpixels.**,org.hibernate.**,org.jboss.**,net.bytebuddy.**,javax.persistence.**,org.eclipse.**,java.awt.datatransfer.**,java.sql.**,org.objectweb.**,org.apache.any23.**
    -ignorewarnings
    -verbose
    -printseeds seed
    # Keep - Applications. Keep all application classes, along with their 'main' methods.
    -keepclasseswithmembers public class * {
        public static void main(java.lang.String[]);
    }
    
    -keep interface *
    -keepnames class ** implements com.xxx.xx.utils.ISerialisable
    -keepclassmembers class ** implements com.xxx.xx.utils.ISerialisable {
      <fields>;
      }
    
    -keep class com.xxx.x.services.** {
        <fields>;
        <methods>;
    }
    -keep class com.xxx.x.exe.** {
        <fields>;
        <methods>;
    }
    -keep public class com.xxx.x.utils.** {
        <fields>;
        <methods>;
    }
    -keep public class com.xxx.x.nalpeiron.** {
        <fields>;
        <methods>;
    }
  
    -keep,allowshrinking class ** extends com.xxx.x.utils.ISerialisable
    # Keep - Applications. Keep all application classes, along with their 'main' methods.
    -keepclasseswithmembers public class * {
        public static void main(java.lang.String[]);
    }
    
   

When Run As>Maven Install, I get the following exception thrown:

[proguard] Preverifying...
 [proguard] Unexpected error while performing partial evaluation:
 [proguard]   Class       = [org/apache/poi/hpbf/extractor/PublisherTextExtractor]
 [proguard]   Method      = [main([Ljava/lang/String;)V]
 [proguard]   Exception   = [java.lang.IllegalArgumentException] (Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 known super classes) and [java/lang/Throwable] (with 2 known super classes))
 [proguard] Unexpected error while preverifying:
 [proguard]   Class       = [org/apache/poi/hpbf/extractor/PublisherTextExtractor]
 [proguard]   Method      = [main([Ljava/lang/String;)V]
 [proguard]   Exception   = [java.lang.IllegalArgumentException] (Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 known super classes) and [java/lang/Throwable] (with 2 known super classes))
 [proguard] java.lang.IllegalArgumentException: Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 known super classes) and [java/lang/Throwable] (with 2 known super classes)

I tried adding org/apache/poi/hpbf/extractor/PublisherTextExtractor to the config but didn't work.

Any idea how to solve this please? thank you!

来源:https://stackoverflow.com/questions/63408063/proguard-cant-find-common-super-class-of-org-apache-poi-hpbf-extractor-publish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!