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 ?
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With