微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

proguard:找不到org / apache / poi / hpbf / extractor / PublisherTextExtractor的通用超类

如何解决proguard:找不到org / apache / poi / hpbf / extractor / PublisherTextExtractor的通用超类

我正在构建一个桌面应用程序(使用Maven OpenJDK11)。我正在使用具有以下配置的ProGuard:

@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.**,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.RCallerScriptEngineExample3.**,javassist.util.HotSwapAgent.**,javassist.util.HotSwapper.**,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.**,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[]);
    }
    
   

以“ Maven安装”运行方式时,出现以下异常:

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

我尝试将org / apache / poi / hpbf / extractor / PublisherTextExtractor添加到配置中,但是没有用。

有什么想法请解决这个问题吗?谢谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。