We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambiguous method overloading for method com.notnoop.apns.ApnsServiceBuilder#withCert. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [class java.io.InputStream, class java.lang.String] [class java.lang.String, class java.lang.String] Around line 24 of ApnsFactoryBean.groovy 21: Object getObject() { 22: def apnsService = APNS.newService() 23: if(certificateResourcePath){ 24: apnsService = apnsService.withCert(this.getClass().getResourceAsStream(certificateResourcePath), password) 25: } else if(pathToCertificate){ 26: apnsService = apnsService.withCert(pathToCertificate, password) 27: } else {
Adding getClassLoader() to the following line in org/epseelon/grails/apns/ApnsFactoryBean.groovy solved the problem for me:
if(certificateResourcePath){ apnsService = apnsService.withCert(this.getClass().getClassLoader().getResourceAsStream(certificateResourcePath), password) } else if(pathToCertificate){ ...
File apns-dev.p12 in src/java, the following lines in Config
environments { development { apns { certificateResourcePath = "apns-dev.p12" password = "secret" environment = "sandbox" } } test { apns { pathToCertificate = "apns-dev.p12" password = "secret" environment = "sandbox" } } production { apns { pathToCertificate = "apns-dev.p12" password = "secret" environment = "production" } } }
$ grails --version Grails version: 2.0.4
$ java -version java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
The text was updated successfully, but these errors were encountered:
Another workaround for this is just to preface your paths with a /. Eg, pathToCertificate = "/apns-dev.p12"
Sorry, something went wrong.
Update README.md
bbddf37
Updated README to avoid Issue sarbogast#1 (Certificate not found)
No branches or pull requests
Error
Solution
Adding getClassLoader() to the following line in org/epseelon/grails/apns/ApnsFactoryBean.groovy solved the problem for me:
My Configuration
File apns-dev.p12 in src/java, the following lines in Config
My Setup
$ grails --version
Grails version: 2.0.4
$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
The text was updated successfully, but these errors were encountered: