alexryasn / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Key Store exception while pushing the notification #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Javapns-2.2 and bcprov-jdk15-146 

Please provide any additional information below.

We are facing issue while pushing the Apple notifications.
Could you please provide some information on how to resolve this issue.

We are able to push the notifications successfully with the standalone program 
by using the same certificate and the same server.

Below is the exception we are getting while pushing the notifications after 
integrating the code with schedulers.

|javapns.communication.exceptions.KeystoreException||Keystore exception: 
exception unwrapping private key - java.security.InvalidKeyException: Illegal 
key size||Stack Trace : javapns.communication.exceptions.KeystoreException: 
Keystore exception: exception unwrapping private key - 
java.security.InvalidKeyException: Illegal key size
        at javapns.communication.KeystoreManager.wrapKeystoreException(KeystoreManager.java:178)
        at javapns.communication.KeystoreManager.loadKeystore(KeystoreManager.java:66)
        at javapns.communication.KeystoreManager.loadKeystore(KeystoreManager.java:42)
        at javapns.communication.KeystoreManager.loadKeystore(KeystoreManager.java:29)
        at javapns.communication.ConnectionToAppleServer.<init>(ConnectionToAppleServer.java:54)
        at javapns.notification.ConnectionToNotificationServer.<init>(ConnectionToNotificationServer.java:16)
        at javapns.notification.PushNotificationManager.initializeConnection(PushNotificationManager.java:105)
        at javapns.Push.sendPayload(Push.java:171)
        at javapns.Push.combined(Push.java:100)
        at com.scheduler.managedtask.helper.PushNotificationHelper.pushSevereAlerts(Unknown Source)
        at com.scheduler.managedtask.helper.PushNotificationHelper.pushNotification(Unknown Source)
        at com.scheduler.managedtask.SeverePushNotificationTask.pushNotifications(SeverePushNotificationTask.java:58)
        at com.scheduler.managedtask.SeverePushNotificationTask.execute(SeverePushNotificationTask.java:44)
        at com.scheduler.scheduledtask.IterativeManagedTaskAdaptor.process(IterativeManagedTaskAdaptor.java:201)
        at livexp.coreimpl.asal.FluxActionListenerAdaptor.actionFired(FluxActionListenerAdaptor.java:47)
        at fluximpl.JavaActionImpl.a(JavaActionImpl.java:0)
        at fluximpl.p8.a(p8.java:641)
        at fluximpl.p8.b(p8.java:565)
        at fluximpl.p8.a(p8.java:353)
        at fluximpl.m9.d(m9.java:23)
        at fluximpl.o2c.run(o2c.java:10)
Caused by: java.io.IOException: exception unwrapping private key - 
java.security.InvalidKeyException: Illegal key size
        at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(Unknown Source)
        at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
        at java.security.KeyStore.load(KeyStore.java:1150)
        at javapns.communication.KeystoreManager.loadKeystore(KeystoreManager.java:64)

Original issue reported on code.google.com by mani.ala...@gmail.com on 24 Jan 2013 at 10:33

GoogleCodeExporter commented 9 years ago
Do you still have that exception?

Original comment by sype...@gmail.com on 5 Feb 2013 at 7:33

GoogleCodeExporter commented 9 years ago
Hi,

Yes, we are still facing that exception.

Original comment by mani.ala...@gmail.com on 6 Feb 2013 at 6:00

GoogleCodeExporter commented 9 years ago
The following page seems to provide quite a lot of information related to your 
particular exception:

http://stackoverflow.com/questions/6363801/invalidkeyexception-illegal-key-size-
java-code-throwing-exception-for-encryp

Also, are you by any chance using "" (blank string) as a password for the 
keystore?

If nothing helps, could you please attach a copy of your source code?

Thank you!

Original comment by sype...@gmail.com on 7 Feb 2013 at 12:06

GoogleCodeExporter commented 9 years ago
Closing for lack of feedback from original poster.

Original comment by sype...@gmail.com on 1 Mar 2013 at 5:18