Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored

i am getting the following info when running my application:

The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

and i want to know what is the cause for such error ?

like image 598
fresh_dev Avatar asked Jan 03 '12 17:01

fresh_dev


1 Answers

First of all, this is a warning, not an error. The difference is pretty huge. The web application can just continue to run. Warnings are merely to inform the developer about circumstances which are different from expected/natural behaviours which does not necessarily break the functionality. This is very useful for the case that the developer was not aware about the configuration and/or its consequences.

That listener is usually auto-registered by JSF TLD file and the ServletContainerInitializer. You can get this warning message if you have actually explicitly registered the very same listener in your webapp's web.xml.

This warning does not harm. It is basically telling you that you don't need to explicitly register the listener in your webapp's web.xml for the particular target servlet container. You could safely remove the <listener> entry in question from the webapp's web.xml.

However, explicit registration is mandatory in some circumstances such as when the webapp is intented to be deployed to a buggy servlet container which does not properly load the listener from the TLD and/or does not support the ServletContainerInitializer.

See also:

  • could not find Factory: javax.faces.context.FacesContextFactory
like image 167
BalusC Avatar answered Nov 15 '22 08:11

BalusC