Hello, You should use single quotes when using non numeric string.. This example is given in the documentation of OID constructor.
OID a = new OID("1.3.6.2.1.5.'hallo'.1"); Hope that helps Regards, RAR -----Original Message----- From: snmp4j-boun...@agentpp.org [mailto:snmp4j-boun...@agentpp.org] On Behalf Of ext Dan Bach Sent: Wednesday, January 25, 2012 12:06 AM To: snmp4j@agentpp.org Subject: [SNMP4J] NET-SNMP-EXTEND-MIB I am trying to use the NET-SNMP-EXTEND-MIB and create an OID which includes a non-numeric string: new VariableBinding(new OID(NET_SNMP_EXTEND_MIB + ".3.1.2.\"datecheck\"")); but I get: java.lang.NumberFormatException: For input string: ""datecheck"" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at org.snmp4j.util.SimpleOIDTextFormat.parse(SimpleOIDTextFormat.java:101) at org.snmp4j.smi.OID.parseDottedString(OID.java:141) at org.snmp4j.smi.OID.<init>(OID.java:79) because OID apparently expects only integers separated by '.'. Is there some way around this? This works with snmpget: # snmpget -v2c -c public <IP addr> NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"datecheck\" NET-SNMP-EXTEND-MIB::nsExtendOutputFull."datecheck" = STRING: Tue Jan 24 18:54:10 EST 2012 _______________________________________________ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j _______________________________________________ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j