RE: DailyRollingFileAppender

2002-10-24 Thread Pounder, Anthony
Solaris is the current platform so a cron job could be used, but Solaris may
not
always be there.  I was looking to see if Log4j could do (will do) this in a

packaged, platform independent way?

AP

>How about a cron job:
>
>   0 1 * * * gzip /somewhere/log/*.log.-??-?? 
>
>(assuming unix, of course)
 

>>On Wed, Oct 23, 2002 at 04:14:17PM +0100, Pounder, Anthony wrote:
>> Secondly, is there anyway of producing compressed versions of the rolled
log
>> files?
>>


===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: DailyRollingFileAppender

2002-10-24 Thread Ceki Gülcü

The next version of log4j will offer much more liberty in defining rolling 
policies.

At 08:28 24.10.2002 +0100, you wrote:
Solaris is the current platform so a cron job could be used, but Solaris may
not
always be there.  I was looking to see if Log4j could do (will do) this in a

packaged, platform independent way?

AP

>How about a cron job:
>
>   0 1 * * * gzip /somewhere/log/*.log.-??-??
>
>(assuming unix, of course)


>>On Wed, Oct 23, 2002 at 04:14:17PM +0100, Pounder, Anthony wrote:
>> Secondly, is there anyway of producing compressed versions of the rolled
log
>> files?
>>--


Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: DailyRollingFileAppender

2002-10-24 Thread Pounder, Anthony
I've looked at the plan for 1.3 and see that there is a section of work
labelled
'Strategy based rollovers' based on the Avalon Logkit.  Have you any idea
when 1.3
may see the light of day?  The Avalon Logkit doesn't seem to mention number
of 
rollovers/compression etc.

Can you give me any feel for the scope of what work is to be included :
e.g. number of rotations to be kept, file compression etc.  Can I aid the
process
by submitting thoughts/ideas/strategies?

Cheers

AP

>The next version of log4j will offer much more liberty in defining rolling 
>policies.


===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




INSTALL doc

2002-10-24 Thread M.Arshad
Hi,

The install instruction still instruct to set the classpath to -

$LOG4J_HOME/dist/lib/log4j-1.2.jar

instead of 

$LOG4J_HOME/dist/lib/log4j-1.2.7.jar

Which can cause problem to the first time users!


Thanks

M.Arshad
Software Engineer
India

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




simple question

2002-10-24 Thread Jung, Eric (Contractor)
Hi everyone,

I'm wondering how I can point log4j to a properties file other than
log4j.xml?
For instance, foo.xml?

Thank you in advance for any ideas,

Eric H. Jung
Russell/Mellon Analytical Services
1-617-382-1373
Everett, MA, USA




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: simple question

2002-10-24 Thread Benoit Voisin
java  -Dlog4j.configuration=your-log4j.xml .


-Original Message-
From: Jung, Eric (Contractor) [mailto:ejung@;russellmellon.com]
Sent: 24 October 2002 14:05
To: '[EMAIL PROTECTED]'
Subject: simple question


Hi everyone,

I'm wondering how I can point log4j to a properties file other than
log4j.xml?
For instance, foo.xml?

Thank you in advance for any ideas,

Eric H. Jung
Russell/Mellon Analytical Services
1-617-382-1373
Everett, MA, USA




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: simple question

2002-10-24 Thread Jung, Eric (Contractor)
Thanks Mike and Benoit!

I should have known this!

-Original Message-
From: Michael P. Canzoneri [mailto:mcanzoneri@;biztech.com]
Sent: Thursday, October 24, 2002 8:12 AM
To: [EMAIL PROTECTED]
Subject: RE: simple question


File f = "C:\\HOME\\foo.lcf"; // lcf = Log control file

PropertyConfigurator.configure(file);

As long as the file's content is in the correct format, by declaring where
the file is located should be the only thing that you need.  There are other
ways to do this but I firgured I would give you one example.

Mike

-Original Message-
From: Jung, Eric (Contractor) [mailto:ejung@;russellmellon.com]
Sent: Thursday, October 24, 2002 8:05 AM
To: '[EMAIL PROTECTED]'
Subject: simple question


Hi everyone,

I'm wondering how I can point log4j to a properties file other than
log4j.xml?
For instance, foo.xml?

Thank you in advance for any ideas,

Eric H. Jung
Russell/Mellon Analytical Services
1-617-382-1373
Everett, MA, USA




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




What happens when the logfile is deleted on the server

2002-10-24 Thread PR-Guest3, Basel {~Basel}
Hi,

I'm currently using a FileAppender, and I would like to know if there is a way to 
continue logging even if someone removes the logfile from the my server ? 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: What happens when the logfile is deleted on the server

2002-10-24 Thread MALLER Stijn (BMB)
I have experienced the same problem. I ended up having to write a new
FileAppender which checks every time the appender is written to wether
or not the logfile still exists. If it doesn't, I just open a new file
with the same name by calling setFile().

If I overlooked an easier or more logical way of accomplishing this I'd
be very interested in finding out.

Regards,
Stijn

-Original Message-
From: PR-Guest3, Basel {~Basel} [mailto:BASEL.PR-GUEST3@;Roche.COM] 
Sent: Thursday, October 24, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: What happens when the logfile is deleted on the server


Hi,

I'm currently using a FileAppender, and I would like to know if there is
a way to continue logging even if someone removes the logfile from the
my server ? 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Log4j: Using servlet to init, but how to reload???

2002-10-24 Thread Shapira, Yoav
Hi,

>
>Log4jInit
>Log4jInit
>
>log4j-init-file
>WEB-INF/log4j.config
>
>1
>

Just keep in mind that the server is not required to keep
load-on-startup servlets in memory.  It may destroy and deallocate them
at anytime, so the destroy() method of your init servlet is NOT a safe
place to do things like LogManager.shutdown().

A ServletContextListener would be a better choice for the above code.

>This works fine, however, any changes made to log4j.config do not take
>effect until the server is restarted. Is the something I can code or
>something I can configure to change this?

Did you try PropertyConfigurator.configureAndWatch()?  Then when you
change the file, log4j will pick it up automatically.

In addition, it is easy to write a page that will accept a logger name
and a logging level and set that logger to that level at runtime.  If
you think this approach would be useful for you and need more
information, let us know.

Yoav Shapira
Millennium ChemInformatics

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:   
For additional commands, e-mail: 


SMTPAppender

2002-10-24 Thread Adams, Dick W [PCS]

I'm trying to get SMTPAppender to work, so far without success. My servlet
logs a fatal error, but no e-mail is generated.  Here's the relevant part of
my log4j.xml (host & addresses changed to protect the guilty):
-







   
   
   
   
   
   
   
   


...etc.
-

Dick Adams
Sprint PCS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: DailyRollingFileAppender

2002-10-24 Thread Ceki Gülcü
At 08:51 24.10.2002 +0100, you wrote:

I've looked at the plan for 1.3 and see that there is a section of work
labelled
'Strategy based rollovers' based on the Avalon Logkit.  Have you any idea
when 1.3
may see the light of day?  The Avalon Logkit doesn't seem to mention number
of
rollovers/compression etc.


Probably not before 1Q or 2Q 2003.


Can you give me any feel for the scope of what work is to be included :
e.g. number of rotations to be kept, file compression etc.  Can I aid the
process by submitting thoughts/ideas/strategies?


Practical help is most appreciated. In the next few days, I will be 
committing the first strategy based roller over implementation. If you 
would like to help, then subscribe to log4j-dev. This will keep you updated 
with all log4j related CVS commits. You can get the latest code from our 
CVS repository. See http://jakarta.apache.org/site/getinvolved.html and 
http://jakarta.apache.org/site/cvsindex.html for more details.

You can chip in as the code gets developed.

Cheers

AP

>The next version of log4j will offer much more liberty in defining rolling
>policies.


--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Fallback Error Handler

2002-10-24 Thread Venkateshwar Bommineni
All,
 Can anyone help me, how to configure in log4j.properties file, fallback
error handler for a SMTP appender.
 I am trying following way which leads to errors.


---
log4j.appender.MailSender=org.apache.log4j.net.SMTPAppender
log4j.appender.MailSender.ErrorHandler=org.apache.log4j.varia.FallbackEr
rorHandler
log4j.appender.MailSender.ErrorHandler.Appender=SysOut
log4j.appender.SysOut=org.apache.log4j.ConsoleAppender

---

whats wrong with that configuration? I do get log4j error at runtime.
Whats the correct configuration?


thanks in advance
--Venkat


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




FW: What happens when the logfile is deleted on the server

2002-10-24 Thread MALLER Stijn (BMB)

Sure,
You have to make a new Appender that extends FileAppender

First add a variable to hold a reference to the logfile

  private File activeLogFile;


Then overwrite the subAppend method to check wether the file still
exists

protected void subAppend(LoggingEvent event) {
if (!activeLogFile.exists()) {
  try {
appendingLog = false;
setFile(fileName, appendingLog, bufferedIO, bufferSize);
  }
  catch (IOException ioe) {
LogLog.error("Could not create file", ioe);
  }
}
super.subAppend(event);
}


And last but not least make sure the reference is always updated when
opening a new file by overriding the setFile method
 
   public synchronized void setFile(String fileName, boolean append,
boolean bufferedIO, int bufferSize)
throws
IOException {
  activeLogFile = new File(fileName);
  super.setFile(fileName, append, bufferedIO, bufferSize);
}


Hope this helps,
Stijn


-Original Message-
From: PR-Guest3, Basel {~Basel} [mailto:BASEL.PR-GUEST3@;Roche.COM] 

Thanks Stijn,

That's what I thought I would have to do, could you tell me where
FileAppender writes to the file ? or wherever you added  your code to
check if the file exists ?

Thanks in advance,
Regis

-Original Message-
From: MALLER Stijn (BMB) [mailto:Stijn.MALLER@;proximus.net]
Sent: Thursday, October 24, 2002 3:05 PM
To: Log4J Users List
Subject: RE: What happens when the logfile is deleted on the server


I have experienced the same problem. I ended up having to write a new
FileAppender which checks every time the appender is written to wether
or not the logfile still exists. If it doesn't, I just open a new file
with the same name by calling setFile().

If I overlooked an easier or more logical way of accomplishing this I'd
be very interested in finding out.

Regards,
Stijn

-Original Message-
From: PR-Guest3, Basel {~Basel} [mailto:BASEL.PR-GUEST3@;Roche.COM] 
Sent: Thursday, October 24, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: What happens when the logfile is deleted on the server


Hi,

I'm currently using a FileAppender, and I would like to know if there is
a way to continue logging even if someone removes the logfile from the
my server ? 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited
to, total or partial reproduction, communication or distribution in any
form) by other persons than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender
either by telephone or by e-mail and delete the material from any
computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see
our website at http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: What happens when the logfile is deleted on the server

2002-10-24 Thread PR-Guest3, Basel {~Basel}
Thanks Stijn,
I expected I would have to do this. 
Could someone tell me where the appender writes so I could modify it to check if the 
file it writes to exists ?


-Original Message-

I have experienced the same problem. I ended up having to write a new
FileAppender which checks every time the appender is written to wether
or not the logfile still exists. If it doesn't, I just open a new file
with the same name by calling setFile().

If I overlooked an easier or more logical way of accomplishing this I'd
be very interested in finding out.

Regards,
Stijn

-Original Message-
From: PR-Guest3, Basel {~Basel} [mailto:BASEL.PR-GUEST3@;Roche.COM] 
Sent: Thursday, October 24, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: What happens when the logfile is deleted on the server


Hi,

I'm currently using a FileAppender, and I would like to know if there is
a way to continue logging even if someone removes the logfile from the
my server ? 

--
To unsubscribe, e-mail:

For additional commands, e-mail:




 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Broken Lunk

2002-10-24 Thread Adams, Dick W [PCS]
Hope this is the right place to report this problem. The link from


http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/package-summar
y.html 

to the log4j.dtd at


http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/doc-files/log4
j.dtd

is broken. I get a 404 error.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




More Broken Links

2002-10-24 Thread Adams, Dick W [PCS]
Links to the sample files (XMLSample.java, sample1.xml, sample2.xml, etc.)
from 


http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/examples/packa
ge-summary.html

are all broken (404 errors).

Dick Adams
Software Engineer
Sprint PCS Technology Services/CAM
(913) 794-4760

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




InvalidClassException

2002-10-24 Thread Lu, David
Can someone please help?

I'm guessing that the problem I'm seeing is rather common...

I am running on WebLogic7 and have put log4j into a small test app.
Prior to adding log4j, everything runs fine.
After putting in log4j into a State class that is passed from the server
side to my rmi client, I begin to see errors.

My State.java has something like:

private static Logger log = Logger.getLogger(
"org.tiaa.logpoc.catalog.statecatalog.model.State" );

The errors I begin to see are:


java.io.InvalidClassException:
org.tiaa.logpoc.catalog.statecatalog.model.State;
 Local class not compatible: stream classdesc
serialVersionUID=-3079158992661169
117 local class serialVersionUID=7923177255097461199
at
java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
18)
at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
:931)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at
weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at
weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at
weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
ction.java:202)
at
weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
tream.java:193)
at
weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:641)
at
weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:488)
at
weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:3
68)
at
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
23)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
--- nested within: --
weblogic.utils.AssertionError: * ASSERTION FAILED *[ Exception
creating
response stream ] - with nested exception:
[java.io.InvalidClassException:
org.tiaa.logpoc.catalog.statecatalog.model.State
; Local class not compatible: stream classdesc
serialVersionUID=-307915899266116
9117 local class serialVersionUID=7923177255097461199]
at
weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
ction.java:212)
at
weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
tream.java:193)


**
This message, including any attachments, contains confidential information intended 
for a specific individual and purpose, and is protected by law.  If you are not the 
intended recipient, please contact sender immediately by reply e-mail and destroy all 
copies.  You are hereby notified that any disclosure, copying, or distribution of this 
message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




custom Level and Filter

2002-10-24 Thread Reeves, Russ
I'm trying to log to various files using filters.
I want to filter on custom Levels.
Is there a document that gives an example of this?
I bought the Log4j manual but it isn't covered.
Regards,
Russ

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: enabling ConsoleAppender DEBUG for specific Logger via log4j.xml

2002-10-24 Thread Glen Cordrey
Thanks, but that doesn't work. First, the xml is invalid - presumably you meant http://www.convera.com> 
fax:(410) 740-8810
 


-Original Message-
From: Jung, Eric (Contractor) [mailto:ejung@;russellmellon.com]
Sent: Thursday, October 24, 2002 11:56 AM
To: 'Log4J Users List'
Subject: RE: enabling ConsoleAppender DEBUG for specific Logger via
log4j.xml



.
.
.
  
 
  
.
.
.

-Original Message-
From: Glen Cordrey [mailto:gcordrey@;convera.com]
Sent: Thursday, October 24, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: enabling ConsoleAppender DEBUG for specific Logger via
log4j.xml


What do I need to do in log4j.xml to enable debug messages to the console
appender
for a Logger I get via org.jboss.logging.Logger.getLogger( "MyLogger" )?
If in the xml for the console appender I have Threshold="DEBUG" I get my
debug messages
but am also swamped by JBoss housekeeping debug messages, so I want to not
get the
JBoss debug messages.
 
Glen Cordrey  Convera  
voice: (410) 740-8800 x1150www.convera.com  
fax:(410) 740-8810
 
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: InvalidClassException

2002-10-24 Thread Daniel Serodio
AFAIK, Logger is not serializable.

On Thu, 2002-10-24 at 11:56, Lu, David wrote:
> Can someone please help?
> 
> I'm guessing that the problem I'm seeing is rather common...
> 
> I am running on WebLogic7 and have put log4j into a small test app.
> Prior to adding log4j, everything runs fine.
> After putting in log4j into a State class that is passed from the server
> side to my rmi client, I begin to see errors.
> 
> My State.java has something like:
> 
> private static Logger log = Logger.getLogger(
> "org.tiaa.logpoc.catalog.statecatalog.model.State" );
> 
> The errors I begin to see are:
> 
> 
> java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State;
>  Local class not compatible: stream classdesc
> serialVersionUID=-3079158992661169
> 117 local class serialVersionUID=7923177255097461199
> at
> java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
> 18)
> at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
> at
> java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
> :931)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
> at
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
> at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:202)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> at
> weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:641)
> at
> weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:488)
> at
> weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:3
> 68)
> at
> weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
> 23)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
> --- nested within: --
> weblogic.utils.AssertionError: * ASSERTION FAILED *[ Exception
> creating
> response stream ] - with nested exception:
> [java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State
> ; Local class not compatible: stream classdesc
> serialVersionUID=-307915899266116
> 9117 local class serialVersionUID=7923177255097461199]
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:212)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> 
> 
> **
> This message, including any attachments, contains confidential information intended 
>for a specific individual and purpose, and is protected by law.  If you are not the 
>intended recipient, please contact sender immediately by reply e-mail and destroy all 
>copies.  You are hereby notified that any disclosure, copying, or distribution of 
>this message, or the taking of any action based on it, is strictly prohibited.
> TIAA-CREF
> **
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
-- 
[]'s
Daniel Serodio


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: InvalidClassException

2002-10-24 Thread Cakalic, James
Let me preface this by saying that I've used serialization lots of times
on objects passed between an application server and Java client (using
RMI/IIOP) when those objects contained private static Logger (or
Category) fields. So I'm sure it can be done.

Did you deploy the new class to both the server and the RMI client? Most
of the time this is the problem. The class definition has apparently
changed by the addition of the static field. According to the
Serialization Spec, "If not specified by the class, the
value [serialVersionUID] returned is a hash computed from the class's
name, interfaces, methods, and fields using the Secure Hash Algorithm
(SHA) as defined by the National Institute of Standards." Although
private static fields are _supposed_ to be ignored when computing the
hash, this may be a defect with either the server or client runtime jvm.
Also, the class initialization method, if it exists, _is_ part of the
hash. So, and I'm going out on a limb here, if this is the first static
field or the first one with a declared initializer, a  method
may have been added to the class. Also, if you've made any other code
changes in concert with adding the static field these may be changing
the UID of the class.

Were both the server class and client class compiled using the same
compiler? Compilers oftimes 'synthesize' various data members. Each
compiler does this differently. That means that the same class compiled
by two different compilers could have different values for
serialVersionUID. This was a real problem for my team using VisualAge
for Java. There was the IDE-internal compiler, a different compiler that
was used by the IDE for export, the JDK javac compiler, and then we were
using a version of jikes to speed up the builds. Each of these produced
differing class definitions.

Have you tried explicitly setting the serialVersionUID of the class?
This is a private static final long field. This prevents the hash
calculation as I indicated above. You can use the serialver utility (try
'serialver -show') to determine an appropriate value to use. Also, you
can use this utility to see whether the serialVersionUID of the class
seen by the server and the class seen by the RMI client have the same
computed UID. See the JDK docs and Serialization Spec for more details
on serialver.

Serialization Spec (HTML and PDF)
http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/serialTOC.doc
.html
ftp://ftp.java.sun.com/docs/j2se1.3/serial-spec.pdf

Best regards,
Jim Cakalic

-Original Message-
From: Lu, David [mailto:dlu@;tiaa-cref.org]
Sent: Thursday, October 24, 2002 10:15 AM
To: 'Log4J Users List'
Subject: RE: InvalidClassException


Does this mean I cannot pass objects which have log4j loggers in them
over
the wire?

Is there a way around this?

-Original Message-
From: Daniel Serodio [mailto:daniel@;checkforte.com.br]
Sent: Thursday, October 24, 2002 11:09 AM
To: Log4J Users List
Subject: Re: InvalidClassException


AFAIK, Logger is not serializable.

On Thu, 2002-10-24 at 11:56, Lu, David wrote:
> Can someone please help?
> 
> I'm guessing that the problem I'm seeing is rather common...
> 
> I am running on WebLogic7 and have put log4j into a small test app.
> Prior to adding log4j, everything runs fine.
> After putting in log4j into a State class that is passed from the
server
> side to my rmi client, I begin to see errors.
> 
> My State.java has something like:
> 
> private static Logger log = Logger.getLogger(
> "org.tiaa.logpoc.catalog.statecatalog.model.State" );
> 
> The errors I begin to see are:
> 
> 
> java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State;
>  Local class not compatible: stream classdesc
> serialVersionUID=-3079158992661169
> 117 local class serialVersionUID=7923177255097461199
> at
> java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
> 18)
> at
java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
> at
> java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
> :931)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
> at
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
> at
weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:202)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> at
> weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:6

enabling ConsoleAppender DEBUG for specific Logger via log4j.xml

2002-10-24 Thread Glen Cordrey
What do I need to do in log4j.xml to enable debug messages to the console appender
for a Logger I get via org.jboss.logging.Logger.getLogger( "MyLogger" )?
If in the xml for the console appender I have Threshold="DEBUG" I get my debug messages
but am also swamped by JBoss housekeeping debug messages, so I want to not get the
JBoss debug messages.
 
Glen Cordrey  Convera  
voice: (410) 740-8800 x1150www.convera.com  
fax:(410) 740-8810
 
 



RE: InvalidClassException

2002-10-24 Thread Lu, David
Does this mean I cannot pass objects which have log4j loggers in them over
the wire?

Is there a way around this?

-Original Message-
From: Daniel Serodio [mailto:daniel@;checkforte.com.br]
Sent: Thursday, October 24, 2002 11:09 AM
To: Log4J Users List
Subject: Re: InvalidClassException


AFAIK, Logger is not serializable.

On Thu, 2002-10-24 at 11:56, Lu, David wrote:
> Can someone please help?
> 
> I'm guessing that the problem I'm seeing is rather common...
> 
> I am running on WebLogic7 and have put log4j into a small test app.
> Prior to adding log4j, everything runs fine.
> After putting in log4j into a State class that is passed from the server
> side to my rmi client, I begin to see errors.
> 
> My State.java has something like:
> 
> private static Logger log = Logger.getLogger(
> "org.tiaa.logpoc.catalog.statecatalog.model.State" );
> 
> The errors I begin to see are:
> 
> 
> java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State;
>  Local class not compatible: stream classdesc
> serialVersionUID=-3079158992661169
> 117 local class serialVersionUID=7923177255097461199
> at
> java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
> 18)
> at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
> at
> java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
> :931)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
> at
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
> at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
> at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:202)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> at
> weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:641)
> at
> weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:488)
> at
> weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:3
> 68)
> at
> weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
> 23)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
> --- nested within: --
> weblogic.utils.AssertionError: * ASSERTION FAILED *[ Exception
> creating
> response stream ] - with nested exception:
> [java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State
> ; Local class not compatible: stream classdesc
> serialVersionUID=-307915899266116
> 9117 local class serialVersionUID=7923177255097461199]
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:212)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> 
> 
> **
> This message, including any attachments, contains confidential information
intended for a specific individual and purpose, and is protected by law.  If
you are not the intended recipient, please contact sender immediately by
reply e-mail and destroy all copies.  You are hereby notified that any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.
> TIAA-CREF
> **
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

-- 
[]'s
Daniel Serodio


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: enabling ConsoleAppender DEBUG for specific Logger via log4j.xml

2002-10-24 Thread Jung, Eric (Contractor)

.
.
.
  
 
  
.
.
.

-Original Message-
From: Glen Cordrey [mailto:gcordrey@;convera.com]
Sent: Thursday, October 24, 2002 11:53 AM
To: [EMAIL PROTECTED]
Subject: enabling ConsoleAppender DEBUG for specific Logger via
log4j.xml


What do I need to do in log4j.xml to enable debug messages to the console
appender
for a Logger I get via org.jboss.logging.Logger.getLogger( "MyLogger" )?
If in the xml for the console appender I have Threshold="DEBUG" I get my
debug messages
but am also swamped by JBoss housekeeping debug messages, so I want to not
get the
JBoss debug messages.
 
Glen Cordrey  Convera  
voice: (410) 740-8800 x1150www.convera.com  
fax:(410) 740-8810
 
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: InvalidClassException

2002-10-24 Thread Ceki Gülcü

That is not it. Static variables are not serialized. The problem David is 
facing is not log4j related rather it is what the errors says: "Local class 
not compatible". David is probably working with two incompatible version of 
the same class.

At 12:08 24.10.2002 -0300, you wrote:
AFAIK, Logger is not serializable.

On Thu, 2002-10-24 at 11:56, Lu, David wrote:
> Can someone please help?
>
> I'm guessing that the problem I'm seeing is rather common...
>
> I am running on WebLogic7 and have put log4j into a small test app.
> Prior to adding log4j, everything runs fine.
> After putting in log4j into a State class that is passed from the server
> side to my rmi client, I begin to see errors.
>
> My State.java has something like:
>
> private static Logger log = Logger.getLogger(
> "org.tiaa.logpoc.catalog.statecatalog.model.State" );
>
> The errors I begin to see are:
>
>
> java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State;
>  Local class not compatible: stream classdesc
> serialVersionUID=-3079158992661169
> 117 local class serialVersionUID=7923177255097461199
> at
> java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
> 18)
> at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
> at
> java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
> :931)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
> at
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
> at
> weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
> at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:202)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
> at
> weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:641)
> at
> weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:488)
> at
> weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:3
> 68)
> at
> weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
> 23)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
> --- nested within: --
> weblogic.utils.AssertionError: * ASSERTION FAILED *[ Exception
> creating
> response stream ] - with nested exception:
> [java.io.InvalidClassException:
> org.tiaa.logpoc.catalog.statecatalog.model.State
> ; Local class not compatible: stream classdesc
> serialVersionUID=-307915899266116
> 9117 local class serialVersionUID=7923177255097461199]
> at
> weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConne
> ction.java:212)
> at
> weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputS
> tream.java:193)
>
>
> **
> This message, including any attachments, contains confidential 
information intended for a specific individual and purpose, and is 
protected by law.  If you are not the intended recipient, please contact 
sender immediately by reply e-mail and destroy all copies.  You are 
hereby notified that any disclosure, copying, or distribution of this 
message, or the taking of any action based on it, is strictly prohibited.
> TIAA-CREF
> **
>
> --
> To unsubscribe, 
e-mail:   
> For additional commands, e-mail: 

--
[]'s
Daniel Serodio


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: