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 Raúl Santiago <mi...@virtualsw.com> on 2006/06/20 10:09:27 UTC
ZeroConfigHubAppender error
I've been using log4j in a desktop app for a while. I tried to use
Chainsaw v2 to watch the log while the app is being tested, from another
computer, using ZeroConfSocketHubAppender.
I made all the necessary steps to add required jar files and modified
log4j.xml config file to use the appender.
My app starts OK, takes a few seconds to make "the network magic", and
Chainsaw v2 finds my app in the network. When I try to connect to the
log, in the app side I get this exception:
Exception in thread "Thread-0" java.lang.NoSuchMethodError:
org.apache.log4j.spi.ComponentBase.access$701(Lorg/apache/log4j/net/SocketHubAppender;)Lorg/apache/log4j/ULogger;
at
org.apache.log4j.net.SocketHubAppender$ServerMonitor.run(SocketHubAppender.java:392)
at java.lang.Thread.run(Thread.java:595)
I'm using Chainsaw v2 (version 2006-03-02 (SVN tag 'release_20060302')),
and the jar libraries linked from the Chainsaw web (log4j ZeroConf
extension and JmDNS bundle).
I've tried with log4j 1.2.13 and 1.3 alpha8. None of them has the method
"access" implemented in "ComponentBase" class. I tried with
"ComponentBase" from the SVN repository, and the method wasn't there
neither.
A Google search was not of great help: at least, two other calls to that
method seem to cause the same exception from other classes, but no
solution found.
Any hint on what is going wrong?
Thanks in advance.
--
Raúl Santiago Gómez
Virtual Software S.L.
mijac@virtualsw.com
"El programador crea aplicaciones a prueba de tontos; Dios crea tontos a prueba de programadores"
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: ZeroConfigHubAppender error
Posted by Paul Smith <ps...@aconex.com>.
>
> And the troubles start:
> Chainsaw detects the "new" ZeroConf appender, and given the fact
> it's from the same station and name, Chainsaw "autoconnects" to it.
> But... in the Receivers tree, my app appears twice, AND the log
> entries appear twice, too.
> If I repeat the process from step 3, a new receiver is added every
> time, and the log entries too... really weird.
> Besides, some of the receivers from the tree can be "shutted down",
> and some others not.
> As result of this, my app sometimes get stuck, can't exit, and the
> local port binded until I manually terminate the process.
>
> Am I doing something wrong? Am I using Chainsaw in a way it is not
> expected?
Nope, I think that's a bug. I'll have to have a look, it's not
supposed to auto-connect if there is an existing SocketHubReceiver
already configured, waiting to auto-reconnect.
Re: your app getting stuck. That might be because of a non-daemon
thread in the SocketAppender stuff, I will investigate that as well.
cheers,
Paul
Re: ZeroConfigHubAppender error
Posted by Raúl Santiago <mi...@virtualsw.com>.
Test done.
It worked perfectly with log4j 1.2.8. I hope this helps isolating the
problem.
Now that I finally can use the ZeroConf feature, I have found a few
annoyances about how Chainsaw seems to handle it:
1 - I start my app.
2 - Chainsaw detects a ZeroConf appender. I check "autoconnect" on the
Appender new row in the ZeroConf tab. It connects ok
3 - I close my app.
4 - I start my app again, without exiting Chainsaw.
And the troubles start:
Chainsaw detects the "new" ZeroConf appender, and given the fact it's
from the same station and name, Chainsaw "autoconnects" to it.
But... in the Receivers tree, my app appears twice, AND the log entries
appear twice, too.
If I repeat the process from step 3, a new receiver is added every time,
and the log entries too... really weird.
Besides, some of the receivers from the tree can be "shutted down", and
some others not.
As result of this, my app sometimes get stuck, can't exit, and the local
port binded until I manually terminate the process.
Am I doing something wrong? Am I using Chainsaw in a way it is not expected?
Thanks in advance... again. Your support is very appreciated.
Paul Smith escribió:
> This is odd, we're using this feature with log4j 1.2.8 in
> production. Maybe it's something in log4j1.2.13 that is different.
> If you had the time, would you be able to try log4j1.2.8 temporarily
> to confirm that works for you? (would help me isolate what I should
> do to fix this).
>
> cheers,
>
> Paul Smith
> On 21/06/2006, at 7:19 PM, Raúl Santiago wrote:
>
>> I've done as suggested. It has worked smoothly, by manually
>> configuring the Appender in the app and the Receiver in Chainsaw.
>> So, as it was just a test of the "coolness" of the ZeroConf Chainsaw
>> feature, I'm not desperate to make it work. I dont have to manage
>> dozens of apps/logs (although it would be nice to add this feature
>> to our JBOSS server), so I can handle the appender/receiver configs
>> manually.
>>
>> But... just in case you're plenty of time to research a bit, what
>> could be done? Should a bug be reported? Looks like a problem with
>> the ZeroConf Appender, not easy to be resolved from the user side.
>>
Un Saludo,
Raúl Santiago Gómez
Virtual Software S.L.
mijac@virtualsw.com
"El programador crea aplicaciones a prueba de tontos; Dios crea tontos a prueba de programadores"
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: ZeroConfigHubAppender error
Posted by Paul Smith <ps...@aconex.com>.
This is odd, we're using this feature with log4j 1.2.8 in
production. Maybe it's something in log4j1.2.13 that is different.
If you had the time, would you be able to try log4j1.2.8 temporarily
to confirm that works for you? (would help me isolate what I should
do to fix this).
cheers,
Paul Smith
On 21/06/2006, at 7:19 PM, Raúl Santiago wrote:
> I've done as suggested. It has worked smoothly, by manually
> configuring the Appender in the app and the Receiver in Chainsaw.
> So, as it was just a test of the "coolness" of the ZeroConf
> Chainsaw feature, I'm not desperate to make it work. I dont have to
> manage dozens of apps/logs (although it would be nice to add this
> feature to our JBOSS server), so I can handle the appender/receiver
> configs manually.
>
> But... just in case you're plenty of time to research a bit, what
> could be done? Should a bug be reported? Looks like a problem with
> the ZeroConf Appender, not easy to be resolved from the user side.
>
> Thanks a lot for your time and helpful steps.
>
> Paul Smith escribió:
>
>>>
>>> Exception in thread "Thread-0" java.lang.NoSuchMethodError:
>>> org.apache.log4j.spi.ComponentBase.access$701(Lorg/apache/log4j/
>>> net/ SocketHubAppender;)Lorg/apache/log4j/ULogger;
>>> at org.apache.log4j.net.SocketHubAppender$ServerMonitor.run
>>> (SocketHubAppender.java:392)
>>> at java.lang.Thread.run(Thread.java:595)
>>>
>>> I'm using Chainsaw v2 (version 2006-03-02 (SVN tag
>>> 'release_20060302')), and the jar libraries linked from the
>>> Chainsaw web (log4j ZeroConf extension and JmDNS bundle).
>>> I've tried with log4j 1.2.13 and 1.3 alpha8. None of them has
>>> the method "access" implemented in "ComponentBase" class. I
>>> tried with "ComponentBase" from the SVN repository, and the
>>> method wasn't there neither.
>>>
>>
>> This error actually doesn't sound like it's related to the
>> ZeroConf- extension itself, but I wouldn't mind first eliminating
>> that to confirm. Could you try the following?
>>
>> 1. Use log4j 1.2.13, and move aside the zeroconf extension jars
>> temporarily
>> 2. In your log4j.xml on the application, change it back to a
>> normal SocketHubAppender instead of the ZeroConf+ version
>> 3. Start up your desktop app
>> 4. Inside Chainsaw, manually create a SocketHubReceiver to
>> connect directly to the remote application via the ip address and
>> port #'s identifying it.
>>
>> My guess is that you will get exactly the same error message, and
>> if this is the case, then there is some binary dependency inside
>> log4j and the SL4j libraries (that's what the ULogger bit is).
>>
>
> --
>
> Un Saludo,
> Raúl Santiago Gómez
> Virtual Software S.L.
> mijac@virtualsw.com
>
> "El programador crea aplicaciones a prueba de tontos; Dios crea
> tontos a prueba de programadores"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
Re: ZeroConfigHubAppender error
Posted by Raúl Santiago <mi...@virtualsw.com>.
I've done as suggested. It has worked smoothly, by manually configuring
the Appender in the app and the Receiver in Chainsaw.
So, as it was just a test of the "coolness" of the ZeroConf Chainsaw
feature, I'm not desperate to make it work. I dont have to manage dozens
of apps/logs (although it would be nice to add this feature to our JBOSS
server), so I can handle the appender/receiver configs manually.
But... just in case you're plenty of time to research a bit, what could
be done? Should a bug be reported? Looks like a problem with the
ZeroConf Appender, not easy to be resolved from the user side.
Thanks a lot for your time and helpful steps.
Paul Smith escribió:
>>
>> Exception in thread "Thread-0" java.lang.NoSuchMethodError:
>> org.apache.log4j.spi.ComponentBase.access$701(Lorg/apache/log4j/net/
>> SocketHubAppender;)Lorg/apache/log4j/ULogger;
>> at org.apache.log4j.net.SocketHubAppender$ServerMonitor.run
>> (SocketHubAppender.java:392)
>> at java.lang.Thread.run(Thread.java:595)
>>
>> I'm using Chainsaw v2 (version 2006-03-02 (SVN tag
>> 'release_20060302')), and the jar libraries linked from the Chainsaw
>> web (log4j ZeroConf extension and JmDNS bundle).
>> I've tried with log4j 1.2.13 and 1.3 alpha8. None of them has the
>> method "access" implemented in "ComponentBase" class. I tried with
>> "ComponentBase" from the SVN repository, and the method wasn't there
>> neither.
>>
>
> This error actually doesn't sound like it's related to the ZeroConf-
> extension itself, but I wouldn't mind first eliminating that to
> confirm. Could you try the following?
>
> 1. Use log4j 1.2.13, and move aside the zeroconf extension jars
> temporarily
> 2. In your log4j.xml on the application, change it back to a normal
> SocketHubAppender instead of the ZeroConf+ version
> 3. Start up your desktop app
> 4. Inside Chainsaw, manually create a SocketHubReceiver to connect
> directly to the remote application via the ip address and port #'s
> identifying it.
>
> My guess is that you will get exactly the same error message, and if
> this is the case, then there is some binary dependency inside log4j
> and the SL4j libraries (that's what the ULogger bit is).
>
--
Un Saludo,
Raúl Santiago Gómez
Virtual Software S.L.
mijac@virtualsw.com
"El programador crea aplicaciones a prueba de tontos; Dios crea tontos a prueba de programadores"
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: ZeroConfigHubAppender error
Posted by Paul Smith <ps...@aconex.com>.
>
> Exception in thread "Thread-0" java.lang.NoSuchMethodError:
> org.apache.log4j.spi.ComponentBase.access$701(Lorg/apache/log4j/net/
> SocketHubAppender;)Lorg/apache/log4j/ULogger;
> at org.apache.log4j.net.SocketHubAppender$ServerMonitor.run
> (SocketHubAppender.java:392)
> at java.lang.Thread.run(Thread.java:595)
>
> I'm using Chainsaw v2 (version 2006-03-02 (SVN tag
> 'release_20060302')), and the jar libraries linked from the
> Chainsaw web (log4j ZeroConf extension and JmDNS bundle).
> I've tried with log4j 1.2.13 and 1.3 alpha8. None of them has the
> method "access" implemented in "ComponentBase" class. I tried with
> "ComponentBase" from the SVN repository, and the method wasn't
> there neither.
>
This error actually doesn't sound like it's related to the ZeroConf-
extension itself, but I wouldn't mind first eliminating that to
confirm. Could you try the following?
1. Use log4j 1.2.13, and move aside the zeroconf extension jars
temporarily
2. In your log4j.xml on the application, change it back to a normal
SocketHubAppender instead of the ZeroConf+ version
3. Start up your desktop app
4. Inside Chainsaw, manually create a SocketHubReceiver to connect
directly to the remote application via the ip address and port #'s
identifying it.
My guess is that you will get exactly the same error message, and if
this is the case, then there is some binary dependency inside log4j
and the SL4j libraries (that's what the ULogger bit is).
Lets try these steps first to see what happens.
cheers,
Paul Smith