logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajendran Marichetty <rmariche...@macromedia.com>
Subject RE: Log4j and JMS
Date Tue, 02 Oct 2001 17:28:51 GMT
make sure you have JMS server up and running and has administered objects for TopicConnectionFactory
and Topic are available through JNDI interface. It seems log4j could not locate your ConnectionFactory
and Topic objects in the directory and naming server.
-raj

-----Original Message-----
From: Jonas Sondell [mailto:jso@ladok.umu.se]
Sent: Tuesday, October 02, 2001 7:56 AM
To: log4j-user@jakarta.apache.org
Subject: Log4j and JMS


Hi
I've been playing around with Log4j for a project and i have some questions
about JMSSink. Ive been tying to configure Log4j with JMS so that i can
deliver error messages to a diffrent machine. But i cant get the example to
work properly. Im using IBM Visual Age for Java 4.0 and i run the testcode
in the IDE.

The error when starting the JMSSink:
=================================================================
log4j: Trying to find [log4j.properties] using
sun.misc.Launcher$AppClassLoader@16aa class loader.
log4j: Using URL [file:/C:/XML_config/log4j.properties] for automatic log4j
configuration.
log4j: Reading configuration from URL file:/C:/XML_config/log4j.properties
log4j: Parsing for [root] with value=[DEBUG, A1].
log4j: Priority token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "A1".
log4j: Setting property [topicConnectionFactoryBindingName] to [TCFBN].
log4j: Setting property [topicBindingName] to [LOG].
log4j:ERROR Could not find name [TCFBN].
log4j:ERROR Error while activating options for appender named [A1].
javax.naming.NameNotFoundException: TCFBN
	...
log4j: Parsed "A1" options.
log4j: Finished configuring.
log4j: Parsing for [root] with value=[DEBUG, A1].
log4j: Priority token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Closing appender [A1].
log4j: Parsing appender named "A1".
log4j: Setting property [topicConnectionFactoryBindingName] to [TCFBN].
log4j: Setting property [topicBindingName] to [LOG].
log4j:ERROR Could not find name [TCFBN].
log4j:ERROR Error while activating options for appender named [A1].
javax.naming.NameNotFoundException: TCFBN
	...
log4j: Parsed "A1" options.
log4j: Finished configuring.
log4j:ERROR Could not find name [TCFBN].
log4j:ERROR Could not read JMS message.
javax.naming.NameNotFoundException: TCFBN
	java.lang.Throwable(java.lang.String)
	java.lang.Exception(java.lang.String)
	javax.naming.NamingException(java.lang.String)
	javax.naming.NameNotFoundException(java.lang.String)
	java.lang.Object
com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(org.omg.CosNaming.NameComponent
[])
	java.lang.Object com.ibm.ejs.ns.jndi.CNContextImpl.lookup(java.lang.String)
	java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
	java.lang.Object org.apache.log4j.net.JMSSink.lookup(javax.naming.Context,
java.lang.String)
	void org.apache.log4j.net.JMSSink.main(java.lang.String [])

log4j: Finalizing appender named [A1].
log4j: Closing appender [A1].
=================================================================

The exceptions occurs when i create a new InitialContext and tries to do a
lookup of the binding name

  protected static Object lookup(Context ctx, String name) throws
NamingException {
    try {
      return ctx.lookup(name); // Error
    } catch(NameNotFoundException e) {
      LogLog.error("Could not find name ["+name+"].");
      throw e;
    }
  }

What could be wrong? Also has anyone tried Log4j and OpenJMS together?

//Jonas




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message