[SNMP4J] SNMP Agent NULL point exception for GET MESSAGE

Frank Fock fock at agentpp.com
Tue Oct 9 22:20:55 CEST 2007


Murali,

You have not set the VACM to the CommandProcessor.
By default BaseAgent does that, but may be have
not used BaseAgent or did not setup it properly?

Best regards,
Frank

Muralidharan Narayanan wrote:
> Frank,
> Here is the information.
> java.lang.NullPointerException
> 	at org.snmp4j.agent.CommandProcessor.getViewName(CommandProcessor.java:545)
> 	at
> org.snmp4j.agent.CommandProcessor.processRequest(CommandProcessor.java:325)
> 	at
> org.snmp4j.agent.CommandProcessor.dispatchCommand(CommandProcessor.java:288)
> 	at org.snmp4j.agent.CommandProcessor$Command.run(CommandProcessor.java:503)
> 	at org.snmp4j.agent.CommandProcessor.processPdu(CommandProcessor.java:128)
> 	at
> org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:5
> 87)
> 	at
> org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:
> 268)
> 	at
> org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:3
> 28)
> 	at
> org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:2
> 90)
> 	at
> org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(AbstractTra
> nsportMapping.java:83)
> 	at
> org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpT
> ransportMapping.java:324)
> 
> Murali
> 
>> -----Original Message-----
>> From: Frank Fock [mailto:fock at agentpp.com]
>> Sent: Tuesday, October 09, 2007 12:41
>> To: Muralidharan Narayanan
>> Cc: snmp4j at agentpp.org
>> Subject: Re: [SNMP4J] SNMP Agent NULL point exception for GET MESSAGE
>>
>>
>> Hello Murali,
>>
>> Can you provide the line number where the exception
>> occurs in MessageDispatcherImpl?
>>
>> Best regards,
>> Frank
>>
>> Muralidharan Narayanan wrote:
>>> Hello:
>>> I have a "java.lang.NullPointerException" occurring when I
>> issue a GET
>>> variable command to my agent.
>>>
>>> I am using SNMPv2c. Agent (this is NOT the TestAgent but
>> our implemented
>>> version) was fully functional with library SNMP4J-1.7.6a and
>>> SNMP4J-agent-1.0.1a. With these older libraries I was able
>> to receive traps
>>> and issue GET commands without any problem.
>>> ------
>>> Here is what I did. I updated the libraries to SNMP4J-1.8.2 and
>>> SNMP4J-agent-1.1.4. I am able to receive traps at SNMP
>> managers without any
>>> problem. But now I get the below "ERROR
>>> DefaultUDPTransportMapping_204.192.50.200/161
>>> org.snmp4j.MessageDispatcherImpl -
>> java.lang.NullPointerException" when I
>>> issue a GET command.
>>> Any ideas what I am missing.
>>> -----
>>> NOTE: updated libraries all worked fine when I test with
>> sample TestAgent
>>> provided
>>>
>>> Any help is appreciated. Thanks
>>> Murali
>>> --------------------------------------------------------
>>> OUTPUT --------------------------------
>>>
>>> 2007-10-09 11:40:47,499 INFO main org.snmp4j.agent.DefaultMOServer -
>>> Registered MO
>>>
>> DefaultMOTable[id=1.3.6.1.6.3.16.1.1.1,index=org.snmp4j.agent.
>> mo.MOTableInde
>> x at 8ff4cf,columns=[org.snmp4j.agent.mo.MOColumn[columnID=1,synt
>> ax=4]]] in
>>> default context with scope
>>>
>> DefaultMOTable[id=1.3.6.1.6.3.16.1.1.1,index=org.snmp4j.agent.
>> mo.MOTableInde
>> x at 8ff4cf,columns=[org.snmp4j.agent.mo.MOColumn[columnID=1,syntax=4]]]
>>> ...
>>> 2007-10-09 11:40:47,562 INFO main org.snmp4j.agent.DefaultMOServer -
>>> Registered MO
>>>
>> DefaultMOTable[id=1.3.6.1.4.1.8716.2.10.1,index=com.triveni.st
>> reamscope.snmp
>> Agent.StreamscopeMib$8 at 162e295,columns=[org.snmp4j.agent.mo.MO
>> Column[columnI
>>> D=1,syntax=66],
>>>
>> org.snmp4j.agent.mo.snmp.DisplayString[columnID=2,syntax=4,def
>> ault=null,mode
>>> =], org.snmp4j.agent.mo.MOColumn[columnID=3,syntax=66]]] in
>> default context
>>> with scope
>>>
>> DefaultMOTable[id=1.3.6.1.4.1.8716.2.10.1,index=com.triveni.st
>> reamscope.snmp
>> Agent.StreamscopeMib$8 at 162e295,columns=[org.snmp4j.agent.mo.MO
>> Column[columnI
>>> D=1,syntax=66],
>>>
>> org.snmp4j.agent.mo.snmp.DisplayString[columnID=2,syntax=4,def
>> ault=null,mode
>>> =], org.snmp4j.agent.mo.MOColumn[columnID=3,syntax=66]]]
>>> 2007-10-09 11:40:47,609 INFO
>> DefaultUDPTransportMapping_204.192.50.200/161
>>> org.snmp4j.transport.DefaultUdpTransportMapping - UDP
>> receive buffer size
>>> for socket 204.192.50.200/161 is set to: 8192
>>> 2007-10-09 11:40:50,499 INFO main
>>> org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl - Sent
>> notification
>>> TRAP[requestID=1888639608, errorStatus=Success(0), errorIndex=0,
>>> VBS[1.3.6.1.2.1.1.3.0 = 0:00:03.28; 1.3.6.1.6.3.1.1.4.1.0 =
>>> 1.3.6.1.4.1.8716.2.11.0.1; 1.3.6.1.4.1.8716.2.2.1 = Murali;
>>> 1.3.6.1.4.1.8716.2.2.2 = ON; 1.3.6.1.4.1.8716.2.2.3 =
>> 204.192.50.200;
>>> 1.3.6.1.4.1.8716.2.2.4 = Tue Oct 09 10:32:59 EDT 2007;
>>> 1.3.6.1.4.1.8716.2.2.5 = Tue Oct 09 10:32:59 EDT 2007;
>>> 1.3.6.1.4.1.8716.2.2.6 = Mon Oct 08 17:01:42 EDT 2007]] to
>>> CommunityTarget[address=204.192.50.200/162, version=1, timeout=2000,
>>> retries=1, community=public]
>>> 2007-10-09 11:41:05,203 ERROR
>> DefaultUDPTransportMapping_204.192.50.200/161
>>> org.snmp4j.MessageDispatcherImpl - java.lang.NullPointerException
>>> _______________________________________________
>>> SNMP4J mailing list
>>> SNMP4J at agentpp.org
>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>> --
>> AGENT++
>> http://www.agentpp.com
>> http://www.mibexplorer.com
>> http://www.mibdesigner.com
>>
>>
> 
> 

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list