anuphatwar08 / javapns

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

encountered "KeystoreException (Keystore contains too many certificates)" #221

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
hi..

I encountered an exception "KeystoreException (Keystore contains too many 
certificates)"
It works fine my mac and ubuntu server but exception occurs on AIX server 
(unfortunately my client using AIX server for backend operation)

please check output info. below and thanks anyway :-)

==========

What steps will reproduce the problem?
> using command line test tools (notification)

What is the expected output? What do you see instead?
(please check info. below)

What version of the product are you using? On what operating system?
(JavaPNS_2.2.jar on AIX server and please check info. below)

Please provide any additional information below.
(please check info. below)

==========
cmd : uname -a
----------
AIX uswas02 1 6 00F64FF04C00
==========
cmd : java -version
----------
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9-20101125_01(SR9))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 
jvmap6460sr9-20101124_69295 (JIT enabled, AOT enabled)
J9VM - 20101124_069295
JIT  - r9_20101028_17488ifx2
GC   - 20101027_AA)
JCL  - 20101119_01
==========
cmd : java -cp 
lib/JavaPNS_2.2.jar:lib/bcprov-jdk15-146.jar:lib/log4j-1.2.15.jar 
javapns.test.NotificationTest key_for_distribution.p12 Pass**** 
d384********************************************************52dc production
----------
Validating keystore reference: VALID  (keystore was found)
Verifying keystore content: javapns.communication.exceptions.KeystoreException: 
Keystore contains too many certificates. Please review the procedure for 
generating a keystore for JavaPNS.
    at javapns.communication.KeystoreManager.verifyKeystoreContent(KeystoreManager.java:142)
    at javapns.communication.KeystoreManager.verifyKeystoreContent(KeystoreManager.java:105)
    at javapns.test.TestFoundation.verifyKeystore(TestFoundation.java:82)
    at javapns.test.NotificationTest.pushTest(NotificationTest.java:78)
    at javapns.test.NotificationTest.main(NotificationTest.java:46)
0 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating 
SSLSocketFactory
270 [main] DEBUG javapns.communication.ConnectionToAppleServer  - Creating 
SSLSocket to gateway.push.apple.com:2195
1349 [main] DEBUG javapns.notification.PushNotificationManager  - Initialized 
Connection to Host: [gateway.push.apple.com] Port: [2195]: 
23ef23ef[SSL_NULL_WITH_NULL_NULL: 
Socket[addr=gateway.push.apple.com/17.110.225.93,port=2195,localport=55393]]
1351 [main] DEBUG javapns.notification.PushNotificationManager  - Building Raw 
message from deviceToken and payload
1659 [main] DEBUG javapns.notification.Payload  - Adding alert [JAVAPNS DEBUG 
ALERT 1
2014/10/22 19:01:11
gateway.push.apple.com
D384¡¦52DC [Id:1] Exp:T+86400
Enhanced format / UTF-8]
1660 [main] DEBUG javapns.notification.PushNotificationManager  - Built raw 
message ID 1 of total length 191
1662 [main] DEBUG javapns.notification.PushNotificationManager  - Attempting to 
send notification: {"aps":{"alert":"JAVAPNS DEBUG ALERT 1\n2014/10/22 
19:01:11\ngateway.push.apple.com\nD384\u202652DC [Id:1] Exp:T+86400\nEnhanced 
format / UTF-8"}}
1662 [main] DEBUG javapns.notification.PushNotificationManager  -   to device: 
d384********************************************************52dc
2224 [main] DEBUG javapns.notification.PushNotificationManager  - Flushing
2225 [main] DEBUG javapns.notification.PushNotificationManager  - At this 
point, the entire 191-bytes message has been streamed out successfully through 
the SSL connection
2225 [main] DEBUG javapns.notification.PushNotificationManager  - Notification 
sent on first attempt
2225 [main] DEBUG javapns.notification.PushNotificationManager  - Reading 
responses
7262 [main] DEBUG javapns.notification.PushNotificationManager  - Closing 
connection
All notifications pushed successfully (1):
  [1] transmitted {"aps":{"alert":"JAVAPNS DEBUG ALERT 1\n2014/10/22 19:01:11\ngateway.push.apple.com\nD384\u202652DC [Id:1] Exp:T+86400\nEnhanced format / UTF-8"}} on first attempt to token d3848..552dc
==========

Original issue reported on code.google.com by cafew...@gmail.com on 23 Oct 2014 at 7:05

GoogleCodeExporter commented 8 years ago
It seems that the error is self-explanatory.  Does your keystore contain more 
than only the certificates required for APNS?  Something must be different 
between your environments, otherwise the result would be the same.

Original comment by sype...@gmail.com on 28 Oct 2014 at 7:21

GoogleCodeExporter commented 8 years ago
ok.. I'll check it out!
thanks a lot.. :-)

Original comment by cafew...@gmail.com on 3 Nov 2014 at 7:35

GoogleCodeExporter commented 8 years ago
Ok.  Please update this issue report with your results so I can either close or 
prioritize it.  Thank you!

Original comment by sype...@gmail.com on 13 Nov 2014 at 5:39