This discussion is archived
1 Reply Latest reply: Jan 6, 2012 3:36 PM by jschellSomeoneStoleMyAlias RSS

Not able to generate and recieve JVM snmp traps

909176 Newbie
Currently Being Moderated
I want JVM instance to generate SNMP trap.

For this i have followed following steps:-

1)I eanbled SNMP agent in JVM,to enable SNMP agent i set following system properties:
->In file present in /jre/lib/management following properties are set

->snmp.acl file is created in /jre/lib/management with following content

acl = {


communities = public, private

access = read-write

managers =



trap = {


trap-community = public

hosts =



trap-community = private

hosts =



->Now i created a program in eclipse which is

public class JVMTraps {
     public static void main(String[] args){
          List<Object> list = new ArrayList<Object>();
               list.add(new Object());
               System.out.println("Object added to list");

->I also set JVM argument which is

Now when i run this program,according to me snmp agent should get enabled and when this program throwsjava.lang.OutOfMemoryError: Java heap space,JVM should generate a trap present in its MIB file but it does not.

For recieving traps i am using a trap viewer configured to listen at port 161 in my localsystem at address

I even tried to send a get request to SNMP agent but result is not good ,when i send get request following response is recieved:

Request Failed: Get Response PDU received from Error Indication in response: There is no such instance in this MIB. Object ID: . NULLOBJ: NULL

Please please help me out in generating jvm traps,tell me what i m missing in it.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points