Closed mwkirk closed 11 years ago
From sype...@gmail.com on November 22, 2011 20:47:12 Fixed in r338 (2.1.001).
From Eventl...@gmail.com on January 16, 2012 23:24:30 Judging from the original post, this issue still exists in 2.1.1?
From sype...@gmail.com on January 16, 2012 23:29:42 Issue 85 states that it was fixed in r338. Have you tried the latest build?
From Eventl...@gmail.com on January 17, 2012 02:39:23 I will try 2.1.1 when we are ready for the next server upgrade. Thanks for your help!
From sype...@gmail.com on January 17, 2012 04:28:44 Make sure you try the latest BUILD, not just the latest released version.... See the Requirements wiki page for info about nightly builds.
From gregp...@gmail.com on February 25, 2013 02:58:48 I'm running 2.2 and this is still happening:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at java.util.Vector.remove(Vector.java:804) at javapns.notification.PushedNotifications.prepareAdd(PushedNotifications.java:103) at javapns.notification.PushedNotifications.addAll(PushedNotifications.java:94) at javapns.notification.transmission.NotificationThreads.getPushedNotifications(NotificationThreads.java:402) at ly.cel.server.APNsManager.handlePushErrors(APNsManager.java:389) at ly.cel.server.APNsManager.pushCellMessageToClient(APNsManager.java:326) at ly.cel.notify.APNsMessageQueueManager.processCellMessage(APNsMessageQueueManager.java:90) at ly.cel.notify.APNsMessageQueueManager.processNewMessage(APNsMessageQueueManager.java:78) at ly.cel.notify.APNsMessageQueueManager.processNewMessage(APNsMessageQueueManager.java:28) at ly.cel.notify.HashedQueueManager.parseJSONAndExecute(HashedQueueManager.java:100) at ly.cel.notify.HashedQueueManager$HashedQueueConsumer.handleJSON(HashedQueueManager.java:120) at com.p2.alchemy.JSONConsumer$1.doTake(JSONConsumer.java:107) at com.p2.alchemy.JSONConsumer$1.run(JSONConsumer.java:56) at java.lang.Thread.run(Thread.java:679)
Original author: gonz...@gmail.com (November 22, 2011 16:52:56)
What steps will reproduce the problem? Same as issue 84
What version of the product are you using? On what operating system? 2.1.1 stable
Please provide any additional information below.
I re-post my comment:
Hi! I was wrong on the correction. The problem was when all of the threads were busy. This fixed the code:
protected NotificationThread getNextAvailableThread() { for (int i = 0; i < threads.size(); i++) { NotificationThread thread = getNextThread(); boolean busy = thread.isBusy(); if (!busy) return thread; } return getNextThread(); /* All threads are busy, return the next one regardless of its busy status */ }
Original issue: http://code.google.com/p/javapns/issues/detail?id=85