Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.relayrides.pushy.apns.ApnsClient]: Factory method 'getPushy' threw exception; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 88 more
Caused by: java.lang.ExceptionInInitializerError
at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:245)
at io.netty.handler.ssl.JdkSslClientContext.<init>(JdkSslClientContext.java:263)
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:739)
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:319)
at com.relayrides.pushy.apns.ApnsClient.getSslContextWithCertificateAndPrivateKey(ApnsClient.java:277)
at com.relayrides.pushy.apns.ApnsClient.<init>(ApnsClient.java:241)
at com.relayrides.pushy.apns.ApnsClient.<init>(ApnsClient.java:219)
at ch.elvetino.eorder.CoreAdditionalConfiguration.getPushy(CoreAdditionalConfiguration.java:60)
at ch.elvetino.eorder.CoreAdditionalConfiguration$$EnhancerBySpringCGLIB$$7e60215b.CGLIB$getPushy$3(<generated>)
at ch.elvetino.eorder.CoreAdditionalConfiguration$$EnhancerBySpringCGLIB$$7e60215b$$FastClassBySpringCGLIB$$709ea1c9.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
at ch.elvetino.eorder.CoreAdditionalConfiguration$$EnhancerBySpringCGLIB$$7e60215b.getPushy(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 89 more
Caused by: java.lang.RuntimeException: ALPN unsupported. Is your classpatch configured correctly? See http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$1.<init>(JdkAlpnApplicationProtocolNegotiator.java:27)
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator.<clinit>(JdkAlpnApplicationProtocolNegotiator.java:24)
... 107 more
Can you please help? Is anyone running this configuration sucessfully on a Mac? Can anyone see an issue in our configuration?
Any hep is highly appreciated...
Thanx a lot from Switzerland,
Florian
--
Pushy is an open-source Java library for sending APNs (iOS and OS X) push notifications. Pushy is brought to you by the engineers at RelayRides.
---
You received this message because you are subscribed to the Google Groups "pushy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>1.1.33.Fork14</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>alpn-boot</artifactId>
<version>${jetty.alpn.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>1.1.2.v20150522</version>
<scope>runtime</scope> <!-- have also tried "provided" -->
</dependency>
<properties>
<jetty.alpn.path>${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${jetty.alpn.version}/alpn-boot-${jetty.alpn.version}.jar</jetty.alpn.path>
<argLine.bootcp>-Xbootclasspath/p:${jetty.alpn.path}</argLine.bootcp>
<!-- ... -->
</properties>
<build>
<plugins>
<plugin> <!-- I don't think I can use surefire since this is not a "test" dependency? -->
<groupId>or.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>${argLine.bootcp}</compilerArgument>
</configuration>
</plugin>
<!-- ... -->
</plugins>
</build>
No matter how I've tried to configure this, I keep getting the same exception when firing up my Spring application.
Caused by: java.lang.RuntimeException: ALPN unsupported. Is your classpatch configured correctly? See http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$1.<init>(JdkAlpnApplicationProtocolNegotiator.java:27)
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator.<clinit>(JdkAlpnApplicationProtocolNegotiator.java:24)
... 78 more
Still no luck. I've updated to OpenSSL 1.0.2f (verified with `openssl version`) and my POM looks like this:<!-- Apple Push Notification Client -->
<dependency>
<groupId>com.relayrides</groupId>
<artifactId>pushy</artifactId>
<version>0.5.2</version>
</dependency>
<!-- Pushy system requirements -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>1.1.33.Fork9</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>1.1.2.v20150522</version>
<scope>runtime</scope>
</dependency>
<!-- Apple Push Notification Client --><dependency> <groupId>com.relayrides</groupId> <artifactId>pushy</artifactId> <version>0.5.2</version></dependency>
<!-- Pushy system requirements -->
<dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.0.CR3</version></dependency><dependency> <groupId>io.netty</groupId> <artifactId>netty-tcnative</artifactId> <version>1.1.33.Fork9</version> <classifier>${os.detected.classifier}</classifier> <!-- I am using the recommended plugin to determine classifier elsewhere, no issues here --></dependency><dependency> <groupId>org.eclipse.jetty.alpn</groupId> <artifactId>alpn-api</artifactId> <version>1.1.2.v20150522</version> <scope>runtime</scope></dependency> <properties>
<os.detection.classifierWithLikes>fedora</os.detection.classifierWithLikes>
</properties>
.................
<dependency>
<groupId>com.relayrides</groupId>
<artifactId>pushy</artifactId>
<version>0.6</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>1.1.2.v20150522</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>1.1.33.Fork15</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
.................
<build>
<extensions>
<!-- Use os-maven-plugin to initialize the "os.detected" properties -->
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.0.Final</version>
</extension>
</extensions>
........................
1919 [main] INFO com.relayrides.pushy.apns.ApnsClient - OpenSSL (via netty-tcnative) not available; will use JDK SSL provider.
Exception in thread "main" java.lang.ExceptionInInitializerError
at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:245)
at io.netty.handler.ssl.JdkSslClientContext.<init>(JdkSslClientContext.java:263)
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:740)
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:394)
at com.relayrides.pushy.apns.ApnsClient.getSslContextWithCertificateAndPrivateKey(ApnsClient.java:358)
at com.relayrides.pushy.apns.ApnsClient.getSslContextWithP12InputStream(ApnsClient.java:352)
at com.relayrides.pushy.apns.ApnsClient.getSslContextWithP12File(ApnsClient.java:329)
at com.relayrides.pushy.apns.ApnsClient.<init>(ApnsClient.java:232)
at com.relayrides.pushy.apns.ApnsClient.<init>(ApnsClient.java:207)
at com.xxx.<init>(zzz.java:48)
at com.xxx(zzz.java:61)
at com.xxx(ccc.java:28)
Caused by: java.lang.RuntimeException: ALPN unsupported. Is your classpatch configured correctly? See http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$1.<init>(JdkAlpnApplicationProtocolNegotiator.java:27)
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator.<clinit>(JdkAlpnApplicationProtocolNegotiator.java:24)
... 12 more