• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 509
  • Last Modified:

How to configure log4j in order to avoid massive emails?

Hi folks,

I have recently configured a SMTPAppender on my log4j configuration (jBoss 4.0.4GA) in order to receive email notifications when an error occurs on my production environment.

It works, but I just experienced a quite annoying problem. When the following type of error occurs, one email is being sent to my mailbox, which makes sense :
08:24:12,172 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.NullPointerException
	at stirq.lds.struts.action.SortieEditAction.generateDropdownList(SortieEditAction.java:479)
	at stirq.lds.struts.action.SortieEditAction.addSortie(SortieEditAction.java:173)
	at sun.reflect.GeneratedMethodAccessor1245.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at stirq.lds.util.SecurityFilter.doFilter(SecurityFilter.java:75)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at stirq.lds.util.TimeoutFilter.doFilter(TimeoutFilter.java:64)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:619)Par contre, lorsqu'il s'agit d'un message d'erreur comme celui-ci, le appender envoit un courriel par ligne où c'est 

Open in new window


On the other side, if the following type of error occurs, the SMTPAppender sends an email for each line :
08:23:23,252 ERROR [STDERR] javax.ejb.ObjectNotFoundException: No such entity!
08:23:23,689 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:64)
08:23:24,611 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
08:23:25,017 ERROR [STDERR] 	at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
08:23:25,548 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
08:23:26,080 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1103)
08:23:26,502 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:669)
08:23:26,939 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
08:23:27,158 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:27,377 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:27,595 ERROR [STDERR] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:27,798 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
08:23:28,267 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:28,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
08:23:29,048 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
08:23:29,408 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:29,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
08:23:29,970 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
08:23:30,298 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
08:23:30,626 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
08:23:30,955 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
08:23:31,330 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:31,658 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
08:23:31,986 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
08:23:32,314 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
08:23:32,876 ERROR [STDERR] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
08:23:33,283 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
08:23:33,783 ERROR [STDERR] 	at org.jboss.ejb.Container.invoke(Container.java:975)
08:23:34,158 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
08:23:34,517 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
08:23:34,892 ERROR [STDERR] 	at $Proxy231.findByPrimaryKey(Unknown Source)
08:23:35,423 ERROR [STDERR] 	at stirq.lds.ejb.session.UserFacadeBean.findUserByPK(UserFacadeBean.java:535)
08:23:36,033 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source)
08:23:36,767 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:37,704 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:37,892 ERROR [STDERR] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:38,361 ERROR [STDERR] 	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
08:23:38,657 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
08:23:38,845 ERROR [STDERR] 	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
08:23:39,142 ERROR [STDERR] 	at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
08:23:39,454 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
08:23:39,939 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
08:23:40,376 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:40,767 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
08:23:41,095 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
08:23:41,423 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
08:23:41,814 ERROR [STDERR] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
08:23:42,142 ERROR [STDERR] 	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
08:23:42,564 ERROR [STDERR] 	at org.jboss.ejb.Container.invoke(Container.java:954)
08:23:44,079 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
08:23:44,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
08:23:48,845 ERROR [STDERR] 	at $Proxy257.findUserByPK(Unknown Source)
08:23:49,188 ERROR [STDERR] 	at stirq.lds.struts.action.SortieEditAction.generateDropdownList(SortieEditAction.java:476)
08:23:49,517 ERROR [STDERR] 	at stirq.lds.struts.action.SortieEditAction.addSortie(SortieEditAction.java:173)
08:23:49,845 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor1245.invoke(Unknown Source)
08:23:50,173 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:50,501 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:51,001 ERROR [STDERR] 	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
08:23:51,251 ERROR [STDERR] 	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
08:23:51,454 ERROR [STDERR] 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
08:23:51,829 ERROR [STDERR] 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
08:23:52,063 ERROR [STDERR] 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
08:23:52,563 ERROR [STDERR] 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
08:23:52,970 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
08:23:53,204 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
08:23:53,720 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
08:23:54,032 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:54,470 ERROR [STDERR] 	at stirq.lds.util.SecurityFilter.doFilter(SecurityFilter.java:75)
08:23:55,298 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:23:55,798 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:56,126 ERROR [STDERR] 	at stirq.lds.util.TimeoutFilter.doFilter(TimeoutFilter.java:64)
08:23:57,016 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:04,438 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:04,766 ERROR [STDERR] 	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
08:24:05,219 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:05,485 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:05,704 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
08:24:06,032 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:06,360 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:06,579 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
08:24:06,922 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
08:24:07,250 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
08:24:07,594 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
08:24:07,844 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
08:24:08,141 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
08:24:08,422 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
08:24:08,750 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
08:24:09,157 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
08:24:09,485 ERROR [STDERR] 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
08:24:10,844 ERROR [STDERR] 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
08:24:11,454 ERROR [STDERR] 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
08:24:11,797 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:619)Comment pourrais-je faire pour regrouper certains 

Open in new window


Here is the problem. I would like to receive one email for that kind of error too.

Is there any way to configure log4j in order to stop that flooding?

Thanks
0
SolutionsTI
Asked:
SolutionsTI
  • 4
  • 3
1 Solution
 
Gurvinder Pal SinghCommented:
both of them are using different appenders for both the errors?

similar error is solved here
https://issues.jboss.org/browse/JBAS-4633
 
0
 
SolutionsTIAuthor Commented:
I used only one appender. Here is the configuration in log4j.xml :
&#9;<appender name="EMAIL"  class="org.apache.log4j.net.SMTPAppender">
        <param name="BufferSize" value="512" />
        <param name="SMTPHost" value="MyMail.net" />
        <param name="From" value="MyServer" />
        <param name="To" value="SomeName@MyEmail.com" />
        <param name="Subject" value="[SMTPAppender] Erreur dans une application" />
        <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>

   <root>
      <appender-ref ref="CONSOLE"/>
      <appender-ref ref="FILE"/>
      <appender-ref ref="EMAIL" />
   </root>

Open in new window


Many thanks
0
 
objectsCommented:
check how you are logging the two errors in your code
0
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

 
SolutionsTIAuthor Commented:
The errors are raised with the printStackTrace() method.

For example:
    public CustomerValue findCustomerByPK(Integer intCustomerId) throws EJBException {
        
    	CustomerValue customerValue = null;
        CustomerLocal customerLocal;

        try {
            customerLocal = customerHome.findByPrimaryKey(intCustomerId);
            customerValue = customerLocal.getValue();
            customerValue = customerLocal.getValueFK(customerValue);
        } catch (FinderException e) {
            e.printStackTrace();
        }

        return customerValue;
    }

Open in new window


Any idea?

Thanks
0
 
objectsCommented:
How is output written to stderr being picked up by log4j?

Try changing it to write error details using log4j

log.error("Bang!!", e);
0
 
SolutionsTIAuthor Commented:
Here is what I get when using
Logger logger = Logger.getLogger("stirq");
logger.error(e);

08:56:08,613 ERROR [stirq] javax.ejb.ObjectNotFoundException: No such entity!

I don't have the error detail.

What I would like to see is the following :
08:23:23,252 ERROR [STDERR] javax.ejb.ObjectNotFoundException: No such entity!
08:23:23,689  	at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:64)
08:23:24,611  	at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
08:23:25,017  	at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
08:23:25,548  	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
08:23:26,080  	at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1103)
08:23:26,502  	at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:669)
08:23:26,939  	at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
08:23:27,158  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:27,377  	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:27,595  	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:27,798  	at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
08:23:28,267  	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:28,642  	at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
08:23:29,048  	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
08:23:29,408  	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:29,642  	at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
08:23:29,970  	at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
08:23:30,298  	at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
08:23:30,626  	at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
08:23:30,955  	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
08:23:31,330  	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:31,658  	at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
08:23:31,986  	at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
08:23:32,314  	at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
08:23:32,876  	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
08:23:33,283  	at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
08:23:33,783  	at org.jboss.ejb.Container.invoke(Container.java:975)
08:23:34,158  	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
08:23:34,517  	at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
08:23:34,892  	at $Proxy231.findByPrimaryKey(Unknown Source)
08:23:35,423  	at stirq.lds.ejb.session.UserFacadeBean.findUserByPK(UserFacadeBean.java:535)
08:23:36,033  	at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source)
08:23:36,767  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:37,704  	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:37,892  	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:38,361  	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
08:23:38,657  	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
08:23:38,845  	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
08:23:39,142  	at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
08:23:39,454  	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
08:23:39,939  	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
08:23:40,376  	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:40,767  	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
08:23:41,095  	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
08:23:41,423  	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
08:23:41,814  	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
08:23:42,142  	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
08:23:42,564  	at org.jboss.ejb.Container.invoke(Container.java:954)
08:23:44,079  	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
08:23:44,642  	at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
08:23:48,845  	at $Proxy257.findUserByPK(Unknown Source)
08:23:49,188  	at stirq.lds.struts.action.SortieEditAction.generateDropdownList(SortieEditAction.java:476)
08:23:49,517  	at stirq.lds.struts.action.SortieEditAction.addSortie(SortieEditAction.java:173)
08:23:49,845  	at sun.reflect.GeneratedMethodAccessor1245.invoke(Unknown Source)
08:23:50,173  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:50,501  	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:51,001  	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
08:23:51,251  	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
08:23:51,454  	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
08:23:51,829  	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
08:23:52,063  	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
08:23:52,563  	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
08:23:52,970  	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
08:23:53,204  	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
08:23:53,720  	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
08:23:54,032  	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:54,470  	at stirq.lds.util.SecurityFilter.doFilter(SecurityFilter.java:75)
08:23:55,298  	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:23:55,798  	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:56,126  	at stirq.lds.util.TimeoutFilter.doFilter(TimeoutFilter.java:64)
08:23:57,016  	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:04,438  	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:04,766  	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
08:24:05,219  	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:05,485  	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:05,704  	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
08:24:06,032  	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:06,360  	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:06,579  	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
08:24:06,922  	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
08:24:07,250  	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
08:24:07,594  	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
08:24:07,844  	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
08:24:08,141  	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
08:24:08,422  	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
08:24:08,750  	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
08:24:09,157  	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
08:24:09,485  	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
08:24:10,844  	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
08:24:11,454  	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
08:24:11,797  	at java.lang.Thread.run(Thread.java:619)Comment pourrais-je faire pour regrouper certains 

Open in new window


Instead of :
08:23:23,252 ERROR [STDERR] javax.ejb.ObjectNotFoundException: No such entity!
08:23:23,689 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:64)
08:23:24,611 ERROR [STDERR] 	at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
08:23:25,017 ERROR [STDERR] 	at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
08:23:25,548 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
08:23:26,080 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1103)
08:23:26,502 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:669)
08:23:26,939 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
08:23:27,158 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:27,377 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:27,595 ERROR [STDERR] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:27,798 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
08:23:28,267 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:28,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
08:23:29,048 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
08:23:29,408 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
08:23:29,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
08:23:29,970 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
08:23:30,298 ERROR [STDERR] 	at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
08:23:30,626 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
08:23:30,955 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
08:23:31,330 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:31,658 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
08:23:31,986 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
08:23:32,314 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
08:23:32,876 ERROR [STDERR] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
08:23:33,283 ERROR [STDERR] 	at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
08:23:33,783 ERROR [STDERR] 	at org.jboss.ejb.Container.invoke(Container.java:975)
08:23:34,158 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
08:23:34,517 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
08:23:34,892 ERROR [STDERR] 	at $Proxy231.findByPrimaryKey(Unknown Source)
08:23:35,423 ERROR [STDERR] 	at stirq.lds.ejb.session.UserFacadeBean.findUserByPK(UserFacadeBean.java:535)
08:23:36,033 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source)
08:23:36,767 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:37,704 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:37,892 ERROR [STDERR] 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
08:23:38,361 ERROR [STDERR] 	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
08:23:38,657 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
08:23:38,845 ERROR [STDERR] 	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
08:23:39,142 ERROR [STDERR] 	at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
08:23:39,454 ERROR [STDERR] 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
08:23:39,939 ERROR [STDERR] 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
08:23:40,376 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
08:23:40,767 ERROR [STDERR] 	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
08:23:41,095 ERROR [STDERR] 	at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
08:23:41,423 ERROR [STDERR] 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
08:23:41,814 ERROR [STDERR] 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
08:23:42,142 ERROR [STDERR] 	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
08:23:42,564 ERROR [STDERR] 	at org.jboss.ejb.Container.invoke(Container.java:954)
08:23:44,079 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
08:23:44,642 ERROR [STDERR] 	at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
08:23:48,845 ERROR [STDERR] 	at $Proxy257.findUserByPK(Unknown Source)
08:23:49,188 ERROR [STDERR] 	at stirq.lds.struts.action.SortieEditAction.generateDropdownList(SortieEditAction.java:476)
08:23:49,517 ERROR [STDERR] 	at stirq.lds.struts.action.SortieEditAction.addSortie(SortieEditAction.java:173)
08:23:49,845 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor1245.invoke(Unknown Source)
08:23:50,173 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
08:23:50,501 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
08:23:51,001 ERROR [STDERR] 	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
08:23:51,251 ERROR [STDERR] 	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
08:23:51,454 ERROR [STDERR] 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
08:23:51,829 ERROR [STDERR] 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
08:23:52,063 ERROR [STDERR] 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
08:23:52,563 ERROR [STDERR] 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
08:23:52,970 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
08:23:53,204 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
08:23:53,720 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
08:23:54,032 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:54,470 ERROR [STDERR] 	at stirq.lds.util.SecurityFilter.doFilter(SecurityFilter.java:75)
08:23:55,298 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:23:55,798 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:23:56,126 ERROR [STDERR] 	at stirq.lds.util.TimeoutFilter.doFilter(TimeoutFilter.java:64)
08:23:57,016 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:04,438 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:04,766 ERROR [STDERR] 	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
08:24:05,219 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:05,485 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:05,704 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
08:24:06,032 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
08:24:06,360 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
08:24:06,579 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
08:24:06,922 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
08:24:07,250 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
08:24:07,594 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
08:24:07,844 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
08:24:08,141 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
08:24:08,422 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
08:24:08,750 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
08:24:09,157 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
08:24:09,485 ERROR [STDERR] 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
08:24:10,844 ERROR [STDERR] 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
08:24:11,454 ERROR [STDERR] 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
08:24:11,797 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:619)Comment pourrais-je faire pour regrouper certains 

Open in new window


(I removed the ERROR [STDERR] string for all sub-errors)

Is there a way to modify the way STDERR shows up in the log file?

Thanks for help
0
 
objectsCommented:
> logger.error(e);

you didn't include a message as I suggested

logger.error("Bang!!", e);

> Is there a way to modify the way STDERR shows up in the log file?

I'm unclear on *how* stderr is being logged by log4j :)
0
 
SolutionsTIAuthor Commented:
Works like a charm!

Thank you very much "objects" for your support!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now