[SNMP4J] ArrayIndexOutOfBoundsException in MessageDispatcherImpl

Frank Fock fock at agentpp.com
Fri Feb 11 12:32:05 CET 2005


Hi Chris,

You get this error because the MPv1 has not been added to your
MessageDispatcherImpl instance (in fact no MessageProcessingModel
has been added). You can add the MPv1 by calling

MessageDispatcher.addMessageProcessingModel(new MPv1());

Best regards,
Frank

chk-world at gmx.de wrote:

>Hi,
>
>using the latest version of snmp4j (1.1) I get the following exception every
>time when receiving a trap:
>
>ERROR [DispatcherPool.0] snmp4j.MessageDispatcherImpl 
>java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
>    at java.util.Vector.get(Vector.java:709)
>    at org.snmp4j.MessageDispatcherImpl.processMessage \ 
>                  (MessageDispatcherImpl.java:273)
>    at org.snmp4j.util.MultiThreadedMessageDispatcher$MessageTask.run \
>                       (MultiThreadedMessageDispatcher.java:179)
>    at org.snmp4j.util.ThreadPool$TaskManager.run(ThreadPool.java:162)
>
>As far as I can see it's catched (this message comes from)
>snmp4j.MessageDispatcherImpl.processMessage(...) line 289.
>
>I create the ThreadPool like this: ThreadPool.create("DispatcherPool", 4));
>The mesasge allways comes from Thread DispatcherPool.0.
>
>Any hints would be appreciated.
>Chris
>
>  
>





More information about the SNMP4J mailing list