Is SNMP4J incompatible with MIB Brower?

Mib Brower can pick up and display details when I use command line trap enter image description here

enter image description here

However, when I trap using SNMP4J, Mib Brower does not show details. Are they incompatible?Or is there something wrong with my trap code?

  public void test () throws IOException {

TransportMapping transport = new DefaultUdpTransportMapping();

CommunityTarget cTarget = new CommunityTarget();
cTarget.setCommunity(new OctetString("public"));
cTarget.setAddress(new UdpAddress("192.168.**.***" + "/" + 162));

PDU pdu = new PDU();
pdu.add(new VariableBinding(SnmpConstants.sysUpTime,new OctetString(new Date().toString())));
pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID("")));
pdu.add(new VariableBinding(SnmpConstants.snmpTrapAddress, new IpAddress("")));
pdu.add(new VariableBinding(new OID(""), new OctetString("Major")));

Snmp snmp = new Snmp(transport);
System.out.println("Sending V2 Trap... Check Wheather NMS is Listening or not? ");

snmp.send(pdu, cTarget);

} enter image description here

Using this code can receive information on the command line, but mib Brower cannot display it enter image description here

With SNMP4J you are sending SNMPv2c but with NET-SNMP command line tool you are sending SNMPv3. Maybe that makes the difference?

On the other hand, you are using a notification ID that is not recommended (backward compatible to SNMPv1).

I found that sysupTime setting error caused mibBrowser not resolved to

I found that sysupTime setting was wrong and mibBrower could not parse。It worked when I used the following method

:+1: That’s right, sysUpTime OBJECT-TYPE has the syntax TimeTicks. Using OCTET-STRING (OctetString) instead will cause problems with nearly all SNMP notification receivers and would violate the SNMP standards.