ryantenney / passkit4j

Java library for generating Apple Passbook (.pkpass) files
http://www.ryantenney.com/passkit4j/
Apache License 2.0
80 stars 50 forks source link

java.lang.NoSuchFieldError: data #45

Open okancetin opened 7 years ago

okancetin commented 7 years ago

`KeyStore keystore = KeyStore.getInstance("PKCS12");

keystore.load(p12File, "test".toCharArray());

PassSigner signer = PassSignerImpl.builder().keystore(keystore, "1").intermediateCertificate(new FileInputStream("AppleWWDRCA.cer")).build();`

I am using this code to create .pkpass file. But when I deploy to Weblogic, PassSignerImpl.builder(). line gives this error :

Caused by: java.lang.NoSuchFieldError: data at org.bouncycastle.cms.CMSSignedGenerator.(Unknown Source) at com.ryantenney.passkit4j.sign.PassSignerImpl.createGenerator(PassSignerImpl.java:136) at com.ryantenney.passkit4j.sign.PassSignerImpl.(PassSignerImpl.java:128) at com.ryantenney.passkit4j.sign.PassSignerImpl$Builder.build(PassSignerImpl.java:122)

7 it looks like the same problem but i checked all the lib files and there is no duplicate or older version of any org.bouncycastle jar files.

I am not even sure if i need to add below dependency to my pom.xml :

`

org.bouncycastle
        <artifactId>bcprov-jdk16</artifactId>
        <version>1.46</version>
    </dependency>`
tsengfhy commented 3 years ago

It seems passkit4j uses the public constructor of CMSSignedGenerator in bcmail-jdk15on, so pls ensure this class isn't overrided in other pkg.