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 Scott Chad D 4-5441 <ch...@lmco.com> on 2001/02/01 20:00:46 UTC

JMSAppenders

I am new to log4j and am trying to set up a simple example using
JMSAppenders.  I have created the appropriate jndi objects and my
"Server" has no problem resolving these objects.  However, when I go to
run my app that uses the JMSAppender I get an exception (included at
bottom).  Here is the config file I use to set up my JMSAppender:

log4j.rootCategory=DEBUG, A1
  
log4j.appender.A1=org.apache.log4j.net.JMSAppender
log4j.appender.A1.TopicBindingName=cn=myTopicBN
log4j.appender.A1.TopicConnectionFactoryBindingName=cn=myTCFBN

Why is log4j throwing this exception when Server seems to have no
problem resolving "myTCFBN".  Thanks for the help.

log4j:ERROR Could not find name [cn=myTCFBN].
log4j:ERROR Error while activating options for appender named [A1].
javax.naming.NameNotFoundException: cn=myTCFBN
        at
com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContext.java:400)
        at
com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
        at
com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
        at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at org.apache.log4j.net.JMSAppender.lookup(JMSAppender.java:52)
        at
org.apache.log4j.net.JMSAppender.activateOptions(JMSAppender.java:65)
        at
org.apache.log4j.PropertyConfigurator.configureOptionHandler(PropertyConfigurator.java:451)
        at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:585)
        at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:555)
        at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:462)

-- 
Chad