logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CONNER, BRENDAN \(SBCSI\)" <bc1...@att.com>
Subject Debugging JMSAppender
Date Mon, 06 Feb 2006 17:44:29 GMT
I'm trying to get JMSAppender working in a WebSphere 6 environment.  The
problem I'm currently trying to resolve is to determine why I'm getting
the following error on my console:

[2/6/06 10:26:50:301 CST] 00000033 SystemErr     R log4j:ERROR Error
while activating options for appender named [JmsAppender].
[2/6/06 10:26:50:317 CST] 00000033 SystemErr     R
java.lang.ClassCastException:
com/ibm/ws/sib/api/jms/impl/JmsManagedConnectionFactoryImpl incompatible
with javax/jms/TopicConnectionFactory
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.net.JMSAppender.activateOptions(Unknown Source)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java
:132)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java
:96)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator
.java:654)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator
.java:612)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConf
igurator.java:533)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
ava:417)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
ava:441)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConver
ter.java:468)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
java.lang.Class.initializeImpl(Native Method)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
java.lang.Class.initialize(Class.java:350)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
org.apache.log4j.Logger.getLogger(Logger.java:116)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.example.pubsub.PublisherSSBBean.publishMessage(PublisherSSBBean.
java:27)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.example.pubsub.EJSLocalStatelessPublisherSSB_83cc570a.publishMes
sage(EJSLocalStatelessPublisherSSB_83cc570a.java:29)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:85)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:58)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:60)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
java.lang.reflect.Method.invoke(Method.java:391)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.etools.utc.model.ReflectionMethodModel.invoke(ReflectionMethodMo
del.java:65)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.etools.utc.servlet.InvokeServlet.invoke(InvokeServlet.java:111)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.etools.utc.servlet.InvokeServlet.doPost(InvokeServlet.java:367)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:1212)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
per.java:629)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS
ervletWrapper.java:80)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:165
7)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:7
7)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
n(HttpInboundLink.java:421)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
n(HttpInboundLink.java:367)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC
LReadCallback.java:94)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa
nager.java:548)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.
java:601)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.
java:934)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager
.java:1021)
[2/6/06 10:26:50:364 CST] 00000033 SystemErr     R 	at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

I tried running the application through the IDE's debugger, but the IDE
says that JMSAppender was not compiled to enable line numbers for
debugging, so I can't actually step into JMSAppender.activateOptions()
to see what's going on.  This was while using the JAR file
log4j-1.2.13.jar.

Once I encountered this obstacle, I tried importing the source directly
into my RSA IDE, but I got some compiler errors saying it was unable to
resolve the import statement for com.sun.jdmk, and it was unable to
resolve the reference to HtmlAdaptor.

So, as a result of this, I have a couple of questions:

1. Is there a JAR file distribution in which all the classes have been
compiled to enable line-by-line debugging, including JMSAppender?
2. If I want to use the source files directly, what external JARs do I
need (and where can I get them) to resolve references such as
HtmlAdaptor and com.sun.jdmk?

Thanks!

- Brendan

P.S. My JMSAppender is configured as follows:

log4j.category.com.ibm.example.pubsub=DEBUG, JmsAppender

log4j.appender.JmsAppender=org.apache.log4j.net.JMSAppender
log4j.appender.JmsAppender.topicConnectionFactoryBindingName=java:comp/e
nv/jms/PSExampleConnectionFactoryRef
log4j.appender.JmsAppender.topicBindingName=java:comp/env/jms/PSExampleT
opicRef

I have already tested the ConnectionFactory and topic independently of
Log4J, so I know that they work outside of the log4j environment.  Do I
need additional properties set up?

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


Mime
View raw message