logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Kedziorski <raf...@polonium.de>
Subject SMTPAppender
Date Wed, 27 Jul 2005 09:10:50 GMT
Hi,

I'm using SMTPAppender in my JBoss with this configuration:

     <!-- An EMail appender -->
     <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
         <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
         <param name="EvaluatorClass" 
value="org.jboss.logging.appender.WarnLevelEventEvaluator"/>
         <param name="Threshold" value="WARN"/>
         <param name="To" value="rafcio@polonium.de"/>
         <param name="From" value="rkedziorski@magix.net"/>
         <param name="Subject" value="Server-Log-Message 
[${jboss.server.name}]"/>
         <param name="SMTPHost" value="10.0.0.20"/>
         <param name="BufferSize" value="512"/>

         <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
               value="[%d{ISO8601}]%n%n%-5p%n%n%c%n%n%m%n%n" />
         </layout>
         <filter class="org.apache.log4j.varia.LevelRangeFilter">
             <param name="LevelMin" value="ERROR"/>
             <param name="LevelMax" value="FATAL"/>
         </filter>
     </appender>

Than my mails with exceptions looks so:

[2005-07-27 11:05:34,575]

FATAL

net.magix.web.api.request.payment.AddInvoiceWhiteList_1_0

run() failed

net.magix.exception.OMAException: 
InvoiceBean::addToInvoiceWhiteList() can't add new user	at 
net.magix.ejb.payment.sessionbeans.InvoiceBean.addToInvoiceWhiteList(InvoiceBean.java:258)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:324)	at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:395) 
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150) 
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) 
at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) 
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

at org.jboss.ejb.Container.invoke(Container.java:709)	at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419) 
at 
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) 
at $Proxy1234.addToInvoiceWhiteList(Unknown Source)	at 
net.magix.ejb.payment.sessionbeans.PaymentFacadeBean.addToInvoiceWhiteList(PaymentFacadeBean.java:925)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:324)	at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317) 
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150) 
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) 
at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) 
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

at org.jboss.ejb.Container.invoke(Container.java:709)	at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419) 
at 
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) 
at $Proxy1232.addToInvoiceWhiteList(Unknown Source)	at 
net.magix.web.api.request.payment.AddInvoiceWhiteList_1_0.run(AddInvoiceWhiteList_1_0.java:61)

at 
net.magix.web.api.request.RequestQueryAnalyzer.analyzeDocument(RequestQueryAnalyzer.java:168)

at net.magix.web.api.XMLServlet.parseXML(XMLServlet.java:172)	at 
net.magix.web.api.XMLServlet.doPost(XMLServlet.java:136)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) 
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) 
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) 
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)	at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) 
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)	at 
org.mortbay.http.HttpServer.service(HttpServer.java:879)	at 
org.jboss.jetty.Jetty.service(Jetty.java:460)	at 
org.mortbay.http.HttpConnection.service(HttpConnection.java:789)	at 
org.mortbay.http.ajp.AJP13Connection.handleNext(AJP13Connection.java:273) 
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)	at 
org.mortbay.http.ajp.AJP13Listener.handleConnection(AJP13Listener.java:199) 
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)	at 
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)


And in my log file:

2005-07-27 11:05:34,575 FATAL 
[net.magix.web.api.request.payment.AddInvoiceWhiteList_1_0] run() failed
net.magix.exception.OMAException: 
InvoiceBean::addToInvoiceWhiteList() can't add new user
         at 
net.magix.ejb.payment.sessionbeans.InvoiceBean.addToInvoiceWhiteList(InvoiceBean.java:258)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
         at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

         at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

         at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
         at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:395)
         at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
         at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
         at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
         at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
         at org.jboss.ejb.Container.invoke(Container.java:709)
         at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
         at 
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
         at $Proxy1234.addToInvoiceWhiteList(Unknown Source)
         at 
net.magix.ejb.payment.sessionbeans.PaymentFacadeBean.addToInvoiceWhiteList(PaymentFacadeBean.java:925)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
         at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

         at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

         at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
         at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317)
         at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150)
         at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
         at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
         at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
         at org.jboss.ejb.Container.invoke(Container.java:709)
         at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
         at 
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
         at $Proxy1232.addToInvoiceWhiteList(Unknown Source)
         at 
net.magix.web.api.request.payment.AddInvoiceWhiteList_1_0.run(AddInvoiceWhiteList_1_0.java:61)
         at 
net.magix.web.api.request.RequestQueryAnalyzer.analyzeDocument(RequestQueryAnalyzer.java:168)
         at net.magix.web.api.XMLServlet.parseXML(XMLServlet.java:172)
         at net.magix.web.api.XMLServlet.doPost(XMLServlet.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
         at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
         at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
         at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
         at org.mortbay.http.HttpServer.service(HttpServer.java:879)
         at org.jboss.jetty.Jetty.service(Jetty.java:460)
         at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
         at 
org.mortbay.http.ajp.AJP13Connection.handleNext(AJP13Connection.java:273)
         at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
         at 
org.mortbay.http.ajp.AJP13Listener.handleConnection(AJP13Listener.java:199)
         at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
         at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)

How can I configure my STMP appender to format exceptions correctly?


Regards,
Rafal


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


Mime
View raw message