[SNMP4J] UnsupportedOperationException in agent beta5 with v1 proxy operations.

Glenn Gerhardt (glgerhar) glgerhar at cisco.com
Fri Aug 4 04:03:02 CEST 2006


Hi again Frank,
Also in SNMP4j-agent beta5, v1/v2c and v2c/v1 proxy operations are now 
giving the UnsupportedOperationException from PUDv1.setMaxRepetitions
and 
PDUv1.setNonRepeaters.

The following if statement was added to ProxyForwarderImpl to clear up
the problem.
-Glenn

  protected void proxyForwardTranslation(ProxyForwardRequest request,
                                         PDU source, PDU target)
      throws IllegalArgumentException
  {
    target.clear();
    target.setType(source.getType());
    if (!(target instanceof PDUv1))
    {
    	target.setMaxRepetitions(source.getMaxRepetitions());
    	target.setNonRepeaters(source.getNonRepeaters());
    }



More information about the SNMP4J mailing list