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 Clive Beavis <cb...@naniqsystems.com> on 2002/12/17 23:00:27 UTC
Multiple log4j JMS appenders with Weblogic 7
I cannot get two log4j JMS appenders to append to a single Weblogic JMS
Topic if one of the log4j appenders is running on the weblogic server that
is also supporting the JMS topic.
The second server (not the one supporting the JMS Topic) will always fail
with "connection not found" .
Simple modification of the Weblogic Topic example shows that other processes
can make the connection successfully.
Also running the JMS Topic server as a separate instance from either of my
two "log4j servers" works fine.
Anyone any idea if this is a log4j topic initialization issue or a Weblogic
configuration/subtlety issue please?
I have tried Initializing log4j in the servlets and as a main start program,
same result
Thanks
Clive
Error message details
log4j: Class name: [org.apache.log4j.net.JMSAppender]
log4j: Setting property [initialContextFactoryName] to
[weblogic.jndi.WLInitialContextFactory].
log4j: Setting property [providerURL] to [t3://localhost:8080].
log4j: Setting property [topicConnectionFactoryBindingName] to
[cipient.jms.IDPFactory].
log4j: Setting property [topicBindingName] to [cipient.jms.IDPTopic].
log4j: Setting property [locationInfo] to [true].
log4j: Getting initial context.
log4j: Looking up [cipient.jms.IDPFactory]
log4j: About to create TopicConnection.
log4j: Creating TopicSession, non-transactional, in AUTO_ACKNOWLEDGE mode.
log4j:ERROR Error while activating options for appender named [JMS].
weblogic.jms.common.JMSException: Connection not found
at
weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java
:134)
at
weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:539)
at
weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:275)
at weblogic.jms.client.JMSConnection.createSession(JMSConnection.java:368)
at
weblogic.jms.client.JMSConnection.createTopicSession(JMSConnection.java:339)
at org.apache.log4j.net.JMSAppender.activateOptions(Unknown Source)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:210)
at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java
:140)
at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator
.java:153)
at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigu
rator.java:415)
at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:790)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:673)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:584)
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:694)
at cipient.util.Debug.<clinit>(Debug.java:43)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at
weblogic.t3.srvr.StartupClassRunner.invokeClass(StartupClassRunner.java:120)
at weblogic.t3.srvr.StartupClassRunner.access$0(StartupClassRunner.java:113)
at weblogic.t3.srvr.StartupClassRunner$1.run(StartupClassRunner.java:86)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:744)
at weblogic.t3.srvr.StartupClassRunner.run(StartupClassRunner.java:71)
at java.lang.Thread.run(Thread.java:479)
log4j: Adding appender named [JMS] to category [root].
Clive Beavis
650 464 2604
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
display only n number of LEFTMOST components in category name?
Posted by Jason Rizer <ja...@yahoo.com>.
Hello,
I'm new to log4j. I'm using the Pattern Layout. It's
possible to suppress the left most components in the
logger name with eg) %c{2}. I'm wondering if there is
some undocumented way to suppress the right most. I
suspect there isn't but figured it couldn't hurt to
ask. Thanks in advance.
-jason
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Are Loggers ever destroyed?
Posted by Jason Rizer <ja...@yahoo.com>.
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> Thanks for the answer but who calls setLevel(String,
> String) and how does
> it know the level to use?
>
> BTW, the answer to your question is that loggers
> cannot be removed. The
> hierarchy will continue to reference all its loggers
> and it cannot be told
> to remove a given logger.
>
> Who calls
>
> At 12:31 18.12.2002 -0800, you wrote:
Thanks again for taking the time to reply. The java
API in question is a piece of middleware. Clients of
this API can be stand alone java applications, web
components, etc. I know of at least one client who
calls setDebugLevel( ) on the fly as a response to
input from their GUI. At any rate, I think I've found
a solution so I'm all set.
>
> >--- Ceki G�lc� <ce...@qos.ch> wrote:
> > >
> > > How do you set the level per connection? I mean
> how
> > > do you know the level
> > > to use?
> >
> >It's exposed through our public API eg)
> >
> >public void setLevel(String loggerName, String
> level)
> >
> >I internally convert the second argument (it's a
> >legacy call - log4j is replacing our current home
> >grown message log) to a log4J Level and, of course,
> >call setLevel( ) on the specified logger.
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> >http://mailplus.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> >For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> Ceki
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Are Loggers ever destroyed?
Posted by Ceki Gülcü <ce...@qos.ch>.
Thanks for the answer but who calls setLevel(String, String) and how does
it know the level to use?
BTW, the answer to your question is that loggers cannot be removed. The
hierarchy will continue to reference all its loggers and it cannot be told
to remove a given logger.
Who calls
At 12:31 18.12.2002 -0800, you wrote:
>--- Ceki Gülcü <ce...@qos.ch> wrote:
> >
> > How do you set the level per connection? I mean how
> > do you know the level
> > to use?
>
>It's exposed through our public API eg)
>
>public void setLevel(String loggerName, String level)
>
>I internally convert the second argument (it's a
>legacy call - log4j is replacing our current home
>grown message log) to a log4J Level and, of course,
>call setLevel( ) on the specified logger.
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Are Loggers ever destroyed?
Posted by Jason Rizer <ja...@yahoo.com>.
--- Ceki G�lc� <ce...@qos.ch> wrote:
>
> How do you set the level per connection? I mean how
> do you know the level
> to use?
It's exposed through our public API eg)
public void setLevel(String loggerName, String level)
I internally convert the second argument (it's a
legacy call - log4j is replacing our current home
grown message log) to a log4J Level and, of course,
call setLevel( ) on the specified logger.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Are Loggers ever destroyed?
Posted by Ceki Gülcü <ce...@qos.ch>.
How do you set the level per connection? I mean how do you know the level
to use?
At 11:59 18.12.2002 -0800, you wrote:
>--- Jason Rizer <ja...@yahoo.com> wrote:
> > Hello,
>
>A quick question. I'm adding log4j logging to an
>application which (among other things) manages
>connections to a database. I'm currently creating a
>logger per connection as there is a requirement that
>the level be settable per connection. The problem
>though is that this application can potentially be
>long lived and the connections are transient so I'm
>wondering if loggers are ever destroyed by default or
>if there is some way to force this behavior? I have a
>concern that over time, the memory usage associated
>with loggers corresponding to long dead connections
>could be considerable. Thanks for any replies.
>
>-Jason
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Are Loggers ever destroyed?
Posted by Jason Rizer <ja...@yahoo.com>.
--- Jason Rizer <ja...@yahoo.com> wrote:
> Hello,
A quick question. I'm adding log4j logging to an
application which (among other things) manages
connections to a database. I'm currently creating a
logger per connection as there is a requirement that
the level be settable per connection. The problem
though is that this application can potentially be
long lived and the connections are transient so I'm
wondering if loggers are ever destroyed by default or
if there is some way to force this behavior? I have a
concern that over time, the memory usage associated
with loggers corresponding to long dead connections
could be considerable. Thanks for any replies.
-Jason
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
display only n number of LEFTMOST components in category name?
Posted by Jason Rizer <ja...@yahoo.com>.
Hello,
I'm new to log4j. I'm using the Pattern Layout. It's
possible to suppress the left most components in the
logger name with eg) %c{2}. I'm wondering if there is
some undocumented way to suppress the right most. I
suspect there isn't but figured it couldn't hurt to
ask. Thanks in advance.
-jason
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>