Hi Scott!
My Java application uses a socketAppender (programmatically) to send log
messages to Chainsaw.
*******
SocketAppender socketAppender = new SocketAppender();
socketAppender.setRemoteHost(<Remote Host>);
socketAppender.setPort( <Port Number>);
socketAppender.setThreshold(<My Threshold>);
socketAppender.setLocationInfo(true);
socketAppender.setName( <SOCKET_APPENDER_NAME>);
socketAppender.activateOptions();
*******
After the new release of Chainsaw (SVN tag 'release_20060302'), I am not
able to display the log messages any longer and I obtain the following
information:
- From the shell I started Chainsaw;
- From Chaisaw GUI application (exporting the content of the
chainsaw-log panel) .
************************************
From the shell I started Chainsaw:
************************************
----------------------------------------------------------------------
Wanting to add a row, but GUI not initialized, waiting...
60203 [Thread-7] ERROR org.apache.log4j.net.SocketNode - Unexpected
exception. Closing connection.
java.lang.ClassNotFoundException: org.apache.log4j.spi.location.LocationInfo
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
at org.apache.log4j.spi.LoggingEvent.readObject(LoggingEvent.java:784)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.apache.log4j.net.SocketNode.run(SocketNode.java:134)
at java.lang.Thread.run(Unknown Source)
----------------------------------------------------------------------
************************************
From Chaisaw GUI application (exporting the content of the chainsaw-log
panel) :
************************************
----------------------------------------------------------------------
…
<log4j:event logger="org.apache.log4j.chainsaw.messages.MessageCenter"
timestamp="1141742951125" sequenceNumber="55" level="INFO"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[Connection received from
localhost:1222]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="55"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.chainsaw.messages.MessageCenter"
timestamp="1141742990015" sequenceNumber="56" level="INFO"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[Connection lost! ::
org.apache.log4j.spi.location.LocationInfo]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="56"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.net.SocketReceiver"
timestamp="1141742998562" sequenceNumber="57" level="DEBUG"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[accepted socket]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="57"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.net.SocketReceiver"
timestamp="1141742998562" sequenceNumber="58" level="DEBUG"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[socket not null - creating and starting
socketnode]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="58"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.net.SocketReceiver"
timestamp="1141742998562" sequenceNumber="59" level="DEBUG"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[waiting to accept socket]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="59"/>
</log4j:properties>
</log4j:event>
<log4j:event logger="org.apache.log4j.chainsaw.messages.MessageCenter"
timestamp="1141742998703" sequenceNumber="60" level="INFO"
thread="Chainsaw-WorkerThread">
<log4j:message><![CDATA[Connection received from
localhost:1224]]></log4j:message>
<log4j:properties>
<log4j:data name="application" value="log"/>
<log4j:data name="hostname" value="chainsaw"/>
<log4j:data name="log4jid" value="60"/>
</log4j:properties>
</log4j:event>
----------------------------------------------------------------------
How to solve the problem?
Should I open a new bug in bugzilla?
Cheers,
E r i c.
Scott Deboy wrote:
Can you provide more information on how you're using LocationInfo (are you using LocationInfo programmatically or just setting 'locationInfo' to true in an appender)?
To support backward compatibility, we are moving LocationInfo back to org.apache.log4j.spi.
This bugzilla issue is tracking the significant backward compatibility efforts
(made by Curt):
http://issues.apache.org/bugzilla/show_bug.cgi?id=35452
Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR 97201
Telephone: 503.224.7496
Cell: 503.997.1367
Fax: 503.222.0185
[EMAIL PROTECTED]
www.comotivsystems.com
-----Original Message-----
From: Eric Frizziero [mailto:[EMAIL PROTECTED]
Sent: Mon 3/6/2006 8:07 AM
To: Log4j-user-MailList
Subject: log4j-1.3alpha-7.jar: two different archives in Chainsaw and Log4J
distributions.
Hi All!
I'm using Chainsaw to display log messages from my application.
After the new release of Chainsaw (SVN tag 'release_20060302'), I am not
able to display the log messages any longer.
My application uses the LocationInfo class (Log4j class);
Both Chainsaw and my application uses the log4j-1.3alpha-7.jar.
After having investigated, I have noted that previous LocationInfo class
is contained in two different packages in Chainsaw and Log4J distributions:
- "org.apache.log4j.spi" in the
log4j-1.3alpha-7.jar (Chainsaw distribution);
- "org.apache.log4j.spi.location" in the log4j-1.3alpha-7.jar
(Log4j distribution)
Why the core jar log4j-1.3alpha-7.jar (named with the same version
1.3alpha-7) is not the same in both the distributions?
Is there probably a mistake in the Chainsaw distribution? Or something
else ...?
Thanks in advance,
E r i c.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]