You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Vivek Kapadekar <vk...@bitfone.com> on 2003/07/05 01:40:14 UTC
Re: SNMPTrapAppender v. 1.2.9
Hi
I am trying to get the SNMP trap Appender to work, this is the first
time I am working on it, so I might have missed some steps.
I have the snmpTrapAppender_1_2_9.jar in the classpath and have put the
default properties in the log4j config file,
log4j.appender.TRAP_LOG=org.apache.log4j.ext.SNMPTrapAppender
log4j.appender.TRAP_LOG.ManagementHost=127.0.0.1
log4j.appender.TRAP_LOG.ManagementHostTrapListenPort=162
log4j.appender.TRAP_LOG.EnterpriseOID=1.3.6.1.4.1.24.0
log4j.appender.TRAP_LOG.LocalIPAddress=127.0.0.1
log4j.appender.TRAP_LOG.LocalTrapSendPort=163
log4j.appender.TRAP_LOG.GenericTrapType=1
log4j.appender.TRAP_LOG.SpecificTrapType=6
log4j.appender.TRAP_LOG.ApplicationTrapOID=1.3.6.1.4.1.24.12.10.22.64
log4j.appender.TRAP_LOG.CommunityString=public
log4j.appender.TRAP_LOG.SysUpTime=1000
log4j.appender.TRAP_LOG.Threshold=DEBUG
log4j.appender.TRAP_LOG.layout=org.apache.log4j.PatternLayout
log4j.appender.TRAP_LOG.layout.ConversionPattern=%d,%p,[%t],[%c],%m%n
When I send log messages, i get this error
Exception in thread "main" java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
org.apache.log4j.ext.SNMPTrapAppender.loadImplementationClass(SNMPTrapAppender.java:323)
at
org.apache.log4j.ext.SNMPTrapAppender.append(SNMPTrapAppender.java:305)
at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
Perhaps I am missing something in the class path, I dont know. Any
ideas?
Thanks for your help.
--Viv
Greetings,
I've released a new version of the SNMPTrapAppender on my Web site. As
always, you can get it here:
http://www.m2technologies.net/asp/snmpTrapAppender.asp
New in this release:
-- a change in the method signature of #initialize in the
SnmpTrapSenderFacade interface, which will allow me to be more flexible
about adding or removing configurable attributes of the appender in the
future.
-- a new configurable attribute that allows one to express a preference for
an SNMP version. Not all libraries can accommodate this, but for those that
can, you can now configure which version you want.
Because of the change in the interface, any code written to the old
interface will break against this version and will need to be changed. I
apologize for any pain that might cause, but the benefit seemed compelling
to me. If you have not written a custom implementation of the interface,
but are using one of the three implementations I provide "out of the box",
this change will not affect you.
Feedback is welcome.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org