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 Ceki Gülcü <ce...@qos.ch> on 2003/04/21 10:02:27 UTC

Re: Yet another SMTPAppender Q.

Hi Roland,

You can choose the layout for SMTPAppender. The layout will determine the 
output format. I hope this helps,

At 03:05 PM 5/9/2002 -0400, Roland Chan wrote:
>Hi All,
>
>I was wondering if it would be possible to just send the date, category
>in the email message.  Also, I've had difficulties truncating the
>message for emails so that they are a little easier to digest over cell
>browsers, etc.  Can anyone provide any suggestions?
>
>Thanks,
>Roll
>

--
Ceki  For log4j documentation consider "The complete log4j manual"
       http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Class Cast Exception while Using Commons Logging With Log4j

Posted by ashokd <as...@visualsoft-tech.com>.
Hi Ceki,

Thanks for your reply.

Another important thing regarding this type behaviour is:
    If I modified any Java files, from then onwards this exception is
coming. I am using WSAD Integaration Edition IDE, if I modified any java
files automaticly this IDE loads the files.

    The print strack trace as below:

org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
 at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
 at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:340)
 at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
 at com.lm.wspr.dao.AbstractDAOImpl.<init>(AbstractDAOImpl.java:32)
 at
com.lm.wspr.dao.datatransfer.DataTransferDAOImpl.<init>(DataTransferDAOImpl.
java:29)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:254)
 at com.lm.wspr.dao.DAOFactory.getDataTransferDAO(DAOFactory.java:45)
 at
com.lm.wspr.web.struts.datatransfer.SourceCntNumIdCheckAction.perform(Source
CntNumIdCheckAction.java:134)
 at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167)
 at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:297)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110)
 at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
 at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
 at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
 at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
 at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:122)
 at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
 at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
 at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
 at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)


Thanks & Regards,
Ashok.D

----- Original Message -----
From: "Ceki Gülcü" <ce...@qos.ch>
To: "Log4J Users List" <lo...@jakarta.apache.org>;
<st...@jakarta.apache.org>
Sent: Monday, April 21, 2003 7:16 PM
Subject: Re: Class Cast Exception while Using Commons Logging With Log4j


>
> Ashok,
>
> The class loader based automatic "discovery process" in
> commons-logging is known to cause the type of ClassCastExceptions you
> encountered.
>
> Could you please include the whole stack trace for a more precise
> identification of the problem? Thank you.
>
> At 06:24 PM 4/21/2003 +0530, ashokd wrote:
> >Hi,
> >
> >I am using Commons Logging and Log4j in my Application.
> >
> >It is working fine, but some times it is giving ClassCastException.
> >
> >If once exception occurs then the same exception repeats until Restart
the
> >server.
> >
> >I have 2 static methods in my class, to debug from this methods I used
the
> >below code as class variable:
> >
> >private static Log logger = LogFactory.getLog( "DAOFactory" );
> >
> >Exception As Below:
> >
> >org.apache.commons.logging.LogConfigurationException:
> >java.lang.ClassCastException:
org.apache.commons.logging.impl.LogFactoryImpl
> >
> >
> >Shall any one help on this.
> >
> >Thanks in Advance,
> >Ashok.D
>
> --
> Ceki  For log4j documentation consider "The complete log4j manual"
>        http://www.qos.ch/shop/products/clm_t.jsp
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Class Cast Exception while Using Commons Logging With Log4j

Posted by ashokd <as...@visualsoft-tech.com>.
Hi Ceki,

Thanks for your reply.

Another important thing regarding this type behaviour is:
    If I modified any Java files, from then onwards this exception is
coming. I am using WSAD Integaration Edition IDE, if I modified any java
files automaticly this IDE loads the files.

    The print strack trace as below:

org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
 at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
 at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:340)
 at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
 at com.lm.wspr.dao.AbstractDAOImpl.<init>(AbstractDAOImpl.java:32)
 at
com.lm.wspr.dao.datatransfer.DataTransferDAOImpl.<init>(DataTransferDAOImpl.
java:29)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:254)
 at com.lm.wspr.dao.DAOFactory.getDataTransferDAO(DAOFactory.java:45)
 at
com.lm.wspr.web.struts.datatransfer.SourceCntNumIdCheckAction.perform(Source
CntNumIdCheckAction.java:134)
 at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1787)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:827)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:167)
 at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
t.java:297)
 at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
Servlet.java:110)
 at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:47
2)
 at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
ager.java:1012)
 at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
er.java:913)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
ebAppRequestDispatcher.java:523)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
Dispatcher.java:282)
 at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
ispatcher.java:112)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
 at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
java:184)
 at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
vocation.java:67)
 at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
estProcessor.java:122)
 at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
.java:315)
 at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.ja
va:60)
 at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
 at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)


Thanks & Regards,
Ashok.D

----- Original Message -----
From: "Ceki Gülcü" <ce...@qos.ch>
To: "Log4J Users List" <lo...@jakarta.apache.org>;
<st...@jakarta.apache.org>
Sent: Monday, April 21, 2003 7:16 PM
Subject: Re: Class Cast Exception while Using Commons Logging With Log4j


>
> Ashok,
>
> The class loader based automatic "discovery process" in
> commons-logging is known to cause the type of ClassCastExceptions you
> encountered.
>
> Could you please include the whole stack trace for a more precise
> identification of the problem? Thank you.
>
> At 06:24 PM 4/21/2003 +0530, ashokd wrote:
> >Hi,
> >
> >I am using Commons Logging and Log4j in my Application.
> >
> >It is working fine, but some times it is giving ClassCastException.
> >
> >If once exception occurs then the same exception repeats until Restart
the
> >server.
> >
> >I have 2 static methods in my class, to debug from this methods I used
the
> >below code as class variable:
> >
> >private static Log logger = LogFactory.getLog( "DAOFactory" );
> >
> >Exception As Below:
> >
> >org.apache.commons.logging.LogConfigurationException:
> >java.lang.ClassCastException:
org.apache.commons.logging.impl.LogFactoryImpl
> >
> >
> >Shall any one help on this.
> >
> >Thanks in Advance,
> >Ashok.D
>
> --
> Ceki  For log4j documentation consider "The complete log4j manual"
>        http://www.qos.ch/shop/products/clm_t.jsp
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Class Cast Exception while Using Commons Logging With Log4j

Posted by Ceki Gülcü <ce...@qos.ch>.
Ashok,

The class loader based automatic "discovery process" in
commons-logging is known to cause the type of ClassCastExceptions you
encountered.

Could you please include the whole stack trace for a more precise
identification of the problem? Thank you.

At 06:24 PM 4/21/2003 +0530, ashokd wrote:
>Hi,
>
>I am using Commons Logging and Log4j in my Application.
>
>It is working fine, but some times it is giving ClassCastException.
>
>If once exception occurs then the same exception repeats until Restart the
>server.
>
>I have 2 static methods in my class, to debug from this methods I used the
>below code as class variable:
>
>private static Log logger = LogFactory.getLog( "DAOFactory" );
>
>Exception As Below:
>
>org.apache.commons.logging.LogConfigurationException:
>java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
>
>
>Shall any one help on this.
>
>Thanks in Advance,
>Ashok.D

--
Ceki  For log4j documentation consider "The complete log4j manual"
       http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Class Cast Exception while Using Commons Logging With Log4j

Posted by ashokd <as...@visualsoft-tech.com>.
Hi,

I am using Commons Logging and Log4j in my Application.

It is working fine, but some times it is giving ClassCastException.

If once exception occurs then the same exception repeats until Restart the
server.

I have 2 static methods in my class, to debug from this methods I used the
below code as class variable:

private static Log logger = LogFactory.getLog( "DAOFactory" );

Exception As Below:

org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl


Shall any one help on this.

Thanks in Advance,
Ashok.D





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Class Cast Exception while Using Commons Logging With Log4j

Posted by ashokd <as...@visualsoft-tech.com>.
Hi,

I am using Commons Logging and Log4j in my Application.

It is working fine, but some times it is giving ClassCastException.

If once exception occurs then the same exception repeats until Restart the
server.

I have 2 static methods in my class, to debug from this methods I used the
below code as class variable:

private static Log logger = LogFactory.getLog( "DAOFactory" );

Exception As Below:

org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl


Shall any one help on this.

Thanks in Advance,
Ashok.D





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org