Hi,

Please check your code. The problem is most likely, that you modify the PDU
while it is being sent out.
Never modify a PDU after you sent it (asynchronously).

Best regards,
Frank


Am 20.12.2013 01:30, schrieb Robert Pierce:

Hi,
We've been noticing an occasional concurrentModificationExcpetion after 
upgrading to SNMP4J 2.2.3 from 2.0.1. Anybody have any thoughts on what might 
cause this  issue. We are running in a multithreaded environment with a single 
SNMP instance but multiple snmpTargets. There should only be one snmpTarget per 
thread. We are running our application on windows 7 64bit with Java 1.7u45.


java.util.ConcurrentModificationException

at java.util.Vector$Itr.checkForComodification(Vector.java:1156)

at java.util.Vector$Itr.next(Vector.java:1133)

at org.snmp4j.PDU.getBERPayloadLengthPDU(PDU.java:557)

at org.snmp4j.PDU.getBERLength(PDU.java:495)

at org.snmp4j.mp.MPv2c.prepareOutgoingMessage(MPv2c.java:122)

at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:479)

at org.snmp4j.Snmp.sendMessage(Snmp.java:1004)

at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1694)

at java.util.TimerThread.mainLoop(Timer.java:555)

at java.util.TimerThread.run(Timer.java:505)


Also, we have been seeing the BufferOverflowException that Baskar reported in 
Nov with the latest 2.2.3.  Does anybody know what Java bug this is related to.


java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:513)
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:163)
at org.snmp4j.asn1.BEROutputStream.write(BEROutputStream.java:63)
at org.snmp4j.asn1.BER.encodeHeader(BER.java:118)
at org.snmp4j.smi.VariableBinding.encodeBER(VariableBinding.java:177)
at org.snmp4j.PDU.encodeBER(PDU.java:573)
at org.snmp4j.mp.MPv2c.prepareOutgoingMessage(MPv2c.java:130)
at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:472)
at org.snmp4j.Snmp.sendMessage(Snmp.java:1005)
at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1666)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)


Thanks,

Robert
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to