[SNMP4J] Exception while running TestAgent

priyanka maheshwari priyanka30maheshwari at yahoo.co.in
Fri Jul 29 14:54:32 CEST 2005


Thanks Matthieu
but now i am having another problem. Where can i found the files SNMP4JTestAgentBC.cfg and SNMP4JTestAgentConfig.cfg? And how can i visualize it as an SNMP agent? I mean how can i send SNMP traps to other system??


Matthieu Casanova <chocolat.mou at gmail.com> wrote:
Hi, it is a bug in the agent, here is the fix that Frank Fock will put in the next release

"The  correct implementation of the MOScalar.isVolatileByDefault method
should have read as follows:

 private static boolean isVolatileByDefault(Variable value) {
   if (value == null) {
     return true;
   }
   switch (value.getSyntax()) {
     case SMIConstants.SYNTAX_COUNTER32:
     case SMIConstants.SYNTAX_COUNTER64: {
       return true;
     }
     default:
       return false;
   }
 }
"

2005/7/29, priyanka maheshwari <priyanka30maheshwari at yahoo.co.in>:Hi
Today I downloaded the snmp4j agent api and when I tried to run org.snmp4j.agent.test.TestAgent.java, It gives the following exception:

0 [main] INFO org.snmp4j.agent.BaseAgent  - Engine boots is: 5
15 [main] INFO org.snmp4j.agent.BaseAgent  - Wrote boot counter: 6
94 [main] DEBUG org.snmp4j.security.Salt  - Initialized Salt to b1318c040edee10a.
Exception in thread "main" java.lang.NullPointerException
        at org.snmp4j.agent.mo.MOScalar.isVolatileByDefault(MOScalar.java:54)
        at org.snmp4j.agent.mo.MOScalar.<init>(MOScalar.java:50)
        at org.snmp4j.agent.mo.snmp.SnmpFrameworkMIB$1.<init>(SnmpFrameworkMIB.java :59)
        at org.snmp4j.agent.mo.snmp.SnmpFrameworkMIB.createMOs(SnmpFrameworkMIB.java:56)
        at org.snmp4j.agent.mo.snmp.SnmpFrameworkMIB.<init>(SnmpFrameworkMIB.java:52)
        at org.snmp4j.agent.BaseAgent.init (BaseAgent.java:80)
        at org.snmp4j.agent.test.TestAgent.main(TestAgent.java:273)

And can anybody also explain the TestAgent.java that how it can be used as SNMP agent.

Thanks


--------------------------------- 
How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos.
http://in.photos.yahoo.com
_______________________________________________ 
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j



		
---------------------------------
How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. 
 http://in.photos.yahoo.com


More information about the SNMP4J mailing list