Bug 44423 - invalid duplicate listeners warning
invalid duplicate listeners warning
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.18
Other Linux
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-02-14 13:47 UTC by Andrei Ivanov
Modified: 2014-02-17 13:49 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Ivanov 2008-02-14 13:47:35 UTC
Using a default tomcat 6.0.16, a new warning appeared in the logs:
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the java.library.path:
/opt/sun-jdk-1.6.0.04/jre/lib/i386/client:/opt/sun-jdk-1.6.0.04/jre/lib/i386:/opt/sun-jdk-1.6.0.04/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Feb 14, 2008 11:44:59 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 14, 2008 11:44:59 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1192 ms
Feb 14, 2008 11:44:59 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 14, 2008 11:44:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Feb 14, 2008 11:45:00 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "listeners.ContextListener" is already configured for this
context. The duplicate definition has been ignored.
Feb 14, 2008 11:45:00 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "listeners.SessionListener" is already configured for this
context. The duplicate definition has been ignored.
Feb 14, 2008 11:45:00 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 14, 2008 11:45:00 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 14, 2008 11:45:00 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/52  config=null
Feb 14, 2008 11:45:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1208 ms

The application containing the listeners is the examples that are bundled with
tomcat.
As far as I can see, the listeners are not duplicated...
Comment 1 Mark Thomas 2008-02-14 13:55:39 UTC
Trunk has already been patched and the patch proposed for 6.0.x. It will be
fixed in the next release.
Comment 2 Mark Thomas 2008-02-21 15:04:34 UTC
This has now been fixed in 6.0.x and will be in 6.0.17 onwards.

For the record, apart from the extra log messages being annoying, this will not
cause an app any problems.
Comment 3 Tom Harris 2008-02-27 13:29:53 UTC
(In reply to comment #2)

Thanks! I thought I was losing my mind for a minute.


> This has now been fixed in 6.0.x and will be in 6.0.17 onwards.
> 
> For the record, apart from the extra log messages being annoying, this will not
> cause an app any problems.

Comment 4 Brett Knights 2008-07-31 12:34:33 UTC
This is still occurring for 6.0.18
2008-07-31 09:45:48.208360500 INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
2008-07-31 09:45:49.117937500 Jul 31, 2008 9:45:49 AM org.apache.catalina.core.StandardContext addApplicationListener
2008-07-31 09:45:49.117941500 INFO: The listener "net.qicnet.sitebuilder.webapp.listener.StartupListener" is already configured for this context. The
duplicate definition has been ignored.
2008-07-31 09:45:49.118523500 Jul 31, 2008 9:45:49 AM org.apache.catalina.core.StandardContext addApplicationListener
2008-07-31 09:45:49.118526500 INFO: The listener "net.qicnet.sitebuilder.webapp.listener.UserCounterListener" is already configured for this context.
The duplicate definition has been ignored.
Comment 5 Mike Morris 2008-08-06 08:45:09 UTC
I confirm that this is still happening in 6.0.18.  Furthermore there seems to be a related bug where the contextDestoyed method is ALSO called during the startup sequence.  Should this be logged as a separate bug?

Logfile trace:

2008/08/06 05:26:11 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/apps/jdk1.6.0_02/jre/lib/i386/client:/home/apps/jdk1.6.0_02/jre/lib/i386:/home/apps/jdk1.6.0_02/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
2008/08/06 05:26:11 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2008/08/06 05:26:11 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 800 ms
2008/08/06 05:26:11 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2008/08/06 05:26:11 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
2008/08/06 05:26:12 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "za.co.cocosoft.etude.server.Lifecycle" is already configured for this context. The duplicate definition has been ignored.
2008/08/06 05:26:12 za.co.cocosoft.etude.server.Lifecycle contextInitialized
CONFIG: Initialising context at /etude
2008/08/06 05:26:12 za.co.cocosoft.etude.scheduler.Scheduler <init>
INFO: Starting Scheduler Thread...
2008/08/06 05:26:12 za.co.cocosoft.etude.server.Lifecycle initScheduler
CONFIG: Registering Scheduler with ServletContext...
2008/08/06 05:26:13 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
2008/08/06 05:26:13 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
2008/08/06 05:26:14 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2008/08/06 05:26:15 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3243 ms
2008/08/06 05:26:16 za.co.cocosoft.etude.server.Lifecycle contextDestroyed
CONFIG: Destroying context at /etude
2008/08/06 05:26:16 za.co.cocosoft.etude.scheduler.Scheduler terminate
INFO: Shutting Down Scheduler...
2008/08/06 05:26:16 za.co.cocosoft.etude.scheduler.Scheduler terminate
FINE: The Scheduler has left the building!
Comment 6 Mark Thomas 2008-08-06 08:59:56 UTC
You are not seeing the bug. You are seeing the results of a configuration issue with your Tomcat instance and/or your application. This is confirmed by the presence of the context destroy which is only called when the context is being shut down.

Please use the users list to debug your configuration.
Comment 7 Geoff The 2008-08-21 12:14:07 UTC
I am also seeing this in 6.0.18 (fresh install under XP, JDK 1.5.0_13):

Aug 21, 2008 3:02:47 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 21, 2008 3:02:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 754 ms
Aug 21, 2008 3:02:47 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 21, 2008 3:02:47 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Aug 21, 2008 3:02:48 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
Aug 21, 2008 3:02:48 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.icesoft.faces.util.event.servlet.ContextEventRepeater" is already configured for this context. The duplicate definition has been ignored.
Aug 21, 2008 3:02:49 PM com.sun.faces.config.ConfigureListener contextInitialized
Comment 8 Tim Funk 2008-08-21 12:18:41 UTC
Please debug through users list. Or attach a valid war which reproduces the issue

Before attaching war - check all your tld files to see if listeners are declared (as well as an jar files which contain tld files) and cross reference to web.xml
Comment 9 Andrei Ivanov 2014-02-17 13:49:56 UTC
Hm, even the Apache bugzilla gets porn spam?