Thank you all for helping me solve log4j (and lot other) serializable issue. - Sandeep ---------- From: Ebersole, Steven Sent: Thursday, February 06, 2003 12:53 PM To: 'Log4J Users List'; '[EMAIL PROTECTED]' Subject: RE: log4j + j2ee error
So do one of the following: 1) public class EmployeeVO implements java.io.Serializable { private static Category log = Category.getInstance( getClass() ); ... public getName() { try { ... } catch(Exception e) { log.error(...); } } } 2) public class EmployeeVO implements java.io.Serializable { private transient Category log; ... public EmployeeVO() { log = Category.getInstance( getClass() ); } public getName() { try { ... } catch(Exception e) { log.error(...); } } } Of course, option #2 is only really of value if retreival of a Category for variable log is based on some type of per-instance data. |-----Original Message----- |From: Sandeep Dixit [mailto:[EMAIL PROTECTED]] |Sent: Thursday, February 06, 2003 12:03 PM |To: '[EMAIL PROTECTED]'; |'[EMAIL PROTECTED]' |Subject: RE: log4j + j2ee error | | |My EmployeeVO valueobject class looks like: | |public class EmployeeVO implements java.io.Serializable |{ | private transient Category log = Category.getInstance( |getClass() ); | ... | | public getName() { | try { | ... | } catch(Exception e) { | log.error(...); | } |} | |- Sandeep | |---------- |From: Martin Gainty |Sent: Thursday, February 06, 2003 12:34 PM |To: [EMAIL PROTECTED] |Cc: [EMAIL PROTECTED] |Subject: RE: log4j + j2ee error | |<<File: ATT00032.html>> | |--- |Incoming mail is certified Virus Free. |Checked by AVG anti-virus system (http://www.grisoft.com). |Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03 | | | |--- |Outgoing mail is certified Virus Free. |Checked by AVG anti-virus system (http://www.grisoft.com). |Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03 | | | |----------------------------------------------------------- |---------- |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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/03
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]