logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: JMSAppender with WSAD 5.1
Date Fri, 17 Oct 2003 16:56:09 GMT

Howdy,
It looks like you switched the names for topicConnFactory and topic in your log4j configuration?
 So when log4j is trying to cast the result of the JNDI lookup to a TopicConnectionFactory,
you get a class case exception.

Also, is this a typo?
>topic = (Topic)ServiceLocator.getInstance().lookup("jms/TESTTOPIC"); 
>
>My Queue is named MYTOPIC

Yoav Shapira
Millennium ChemInformatics

-----Original Message-----
From: Peter Cipriano [mailto:cipriano@us.ibm.com] 
Sent: Friday, October 17, 2003 12:41 PM
To: log4j-dev@jakarta.apache.org
Subject: JMSAppender with WSAD 5.1


I have been trying to get the JMSAppender to work for quite some time now on the WSAD 5.1
Test Environment but cannot get the TopicConnectionFactoryBindingName correct (I think).  I
have a MDB set up and I know works because I can acces it using: 

topicConnFactory = (TopicConnectionFactory)ServiceLocator.getInstance().lookup("jms/TESTTCF");

topicConnection = topicConnFactory.createTopicConnection(); 
topicSession = topicConnection.createTopicSession( false, TopicSession.AUTO_ACKNOWLEDGE);

topic = (Topic)ServiceLocator.getInstance().lookup("jms/TESTTOPIC"); 

My Queue is named MYTOPIC 

I have tried alot of different syntax and would list them all but that would take all day.
I received mostly, "Name not Found" and "Class Cast" errors.  I will rerun some of the types
and paste in the error messages anyone would like more info 

The following setup causes a " java.lang.ClassCastException: com.ibm.mq.jms.MQTopic at org.apache.log4j.net.JMSAppender.activateOptions(JMSAppender.java:196)"
exception 

# Log4j Properties 
#------------------ 

log4j.rootLogger= DEBUG, JMS1 
log4j.appender.JMS1                                = org.apache.log4j.net.JMSAppender

log4j.appender.JMS1.TopicBindingName        = jms/TESTTCF 
log4j.appender.JMS1.TopicConnectionFactoryBindingName = jms/TESTTOPIC 
log4j.appender.JMS1.layout                        = org.apache.log4j.PatternLayout
        
log4j.appender.JMS1.layout.ConversionPattern        = [%-20d{M/d/yy HH:mm:ss.sss z}] %-25t:%-5p
%-30c - %m%n 

Thanks for your time,

Peter Cipriano



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message