With JDK 6 it works fine.
When i try this code with JDK 8, it is giving me SSL error.
Launching Monitoring Thread for socket 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]]
19:33:53.797 [main] DEBUG c.n.apns.internal.ApnsConnectionImpl - Made a new connection to APNS
19:33:53.797 [MonitoringThread-2] DEBUG c.n.apns.internal.ApnsConnectionImpl - Started monitoring thread
19:33:54.380 [main] DEBUG com.notnoop.apns.internal.Utilities - close 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]]
19:33:54.382 [MonitoringThread-2] DEBUG c.n.apns.internal.ApnsConnectionImpl - Monitoring input stream closed by EOF
19:33:54.382 [MonitoringThread-2] DEBUG com.notnoop.apns.internal.Utilities - close 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]]
19:33:54.399 [main] INFO c.n.apns.internal.ApnsConnectionImpl - Failed to send message Message(Id=1; Token=E2ED7D501B3CF1CF140B93AD6D7EE0A5E6C76B3AF1384E203138F1CACA0CED33; Payload={"msg":"Some Test Message","smooogle":"ffhrufhru","aps":{"alert":"Public Desire: Some Test Message","sound":"default"},"listname":"Public Desire"})... trying again after delay
javax.net.ssl.SSLException: Received fatal alert: internal_error
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.8.0_111]
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) ~[na:1.8.0_111]
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023) ~[na:1.8.0_111]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125) ~[na:1.8.0_111]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_111]
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) ~[na:1.8.0_111]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) ~[na:1.8.0_111]
at java.io.OutputStream.write(OutputStream.java:75) ~[na:1.8.0_111]
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:330) [bin/:na]
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:314) [bin/:na]
at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) [bin/:na]
at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56) [bin/:na]
at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:1) [bin/:na]
at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:1) [bin/:na]
With JDK 6 it works fine. When i try this code with JDK 8, it is giving me SSL error. Launching Monitoring Thread for socket 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]] 19:33:53.797 [main] DEBUG c.n.apns.internal.ApnsConnectionImpl - Made a new connection to APNS 19:33:53.797 [MonitoringThread-2] DEBUG c.n.apns.internal.ApnsConnectionImpl - Started monitoring thread 19:33:54.380 [main] DEBUG com.notnoop.apns.internal.Utilities - close 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]] 19:33:54.382 [MonitoringThread-2] DEBUG c.n.apns.internal.ApnsConnectionImpl - Monitoring input stream closed by EOF 19:33:54.382 [MonitoringThread-2] DEBUG com.notnoop.apns.internal.Utilities - close 2893de87[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.188.166.23,port=2195,localport=54844]] 19:33:54.399 [main] INFO c.n.apns.internal.ApnsConnectionImpl - Failed to send message Message(Id=1; Token=E2ED7D501B3CF1CF140B93AD6D7EE0A5E6C76B3AF1384E203138F1CACA0CED33; Payload={"msg":"Some Test Message","smooogle":"ffhrufhru","aps":{"alert":"Public Desire: Some Test Message","sound":"default"},"listname":"Public Desire"})... trying again after delay javax.net.ssl.SSLException: Received fatal alert: internal_error at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.8.0_111] at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) ~[na:1.8.0_111] at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023) ~[na:1.8.0_111] at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125) ~[na:1.8.0_111] at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[na:1.8.0_111] at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) ~[na:1.8.0_111] at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) ~[na:1.8.0_111] at java.io.OutputStream.write(OutputStream.java:75) ~[na:1.8.0_111] at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:330) [bin/:na] at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:314) [bin/:na] at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) [bin/:na] at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56) [bin/:na] at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:1) [bin/:na] at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:1) [bin/:na]