简体   繁体   中英

ProguardConfig.pro cant find superclass or interface java.lang.Object

I try to obfuscate .jar with proguard-4.2 but I get the following errors.

ProGuard, version 4.2 Reading program jar

 [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\IntegraA_v1.1.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\axis.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\jaxrpc.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\dom4j-1.6.1.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\java-json.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\wss4j-1.5.1.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\jaxen-1.1-beta-6.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\commons-logging.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\commons-discovery-0.2.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\wsdl4j.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\xmlsec-1.4.3.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\xalan-2.7.0.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\commons-codec-1.9.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\commons-io-2.4.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\cxf-rt-ws-addr-2.1.3.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\cxf-rt-ws-security-2.4.0.jar]
 Reading library jar [C:\Users\gonzalo.lasarte\Documents\Desarrollos\JARS Y WARS\Ofuscate\proguard-4.2.jar\lib\cxf-api-2.2.3.jar]
 Warning: es.sag.autentica.XMLReader.XMLReader: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.afirma.validateSign.utils.XMLRequestConstructor: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.utils.IntegraAUtility: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.XMLValidate.XMLValidate: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.objects.ResponseValidateSignObject: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.staticdata.StaticData: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.helpers.ConfigureAfirmaConnection: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.helpers.LogHelper: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.afirma.validateSign.utils.XMLAFirmaReader: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.afirma.validateSign.utils.UtilXML: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.afirma.RequestConstructor: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.exceptions.AfirmaParamsNoDefinedException: can't find superclass or interface java.lang.Exception
 Warning: es.sag.autentica.afirma.validateSign.Sign: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.objects.XMLResponseObject: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.afirma.staticdata.AFirmaStaticData: can't find superclass or interface java.lang.Object
 Warning: es.sag.autentica.XMLValidate.XMLValidate: can't find referenced method 'void printStackTrace()' in class javax.xml.rpc.ServiceException
 Warning: es.sag.autentica.afirma.RequestConstructor: can't find referenced method 'java.lang.String getMessage()' in class org.apache.axis.AxisFault
 Warning: there were 15 unresolved references to superclasses or interfaces.
     You may need to specify additional library jars (using '-libraryjars'),
     or perhaps the '-dontskipnonpubliclibraryclasses' option.

Warning: there were 2 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile them and try again. Alternatively, you may have to specify the options '-dontskipnonpubliclibraryclasses' and/or '-dontskipnonpubliclibraryclassmembers'. Error: Please correct the above warnings first.

My proguardConfig.pro

-keep class org.apache.http.**

-keep interface org.apache.http.** -dontwarn org.apache.**

-injars IntegraA_v1.1.jar -outjars IntegraA_v1.1Obf.jar

-libraryjars /lib/axis.jar -libraryjars /lib/jaxrpc.jar -libraryjars /lib/dom4j-1.6.1.jar -libraryjars /lib/java-json.jar -libraryjars /lib/wss4j-1.5.1.jar -libraryjars /lib/jaxen-1.1-beta-6.jar -libraryjars /lib/commons-logging.jar -libraryjars /lib/commons-discovery-0.2.jar -libraryjars /lib/wsdl4j.jar -libraryjars /lib/xmlsec-1.4.3.jar -libraryjars /lib/xalan-2.7.0.jar -libraryjars /lib/commons-codec-1.9.jar -libraryjars /lib/commons-io-2.4.jar -libraryjars /lib/cxf-rt-ws-addr-2.1.3.jar -libraryjars /lib/cxf-rt-ws-security-2.4.0.jar -libraryjars /lib/cxf-api-2.2.3.jar

Thanks!

Add -libraryjars /lib/rt.jar

Needs to know the runtime classes -- have a look at the examples: https://www.guardsquare.com/en/proguard/manual/examples#application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM