This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSF and the fly likes Invalid Warning of Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Invalid Warning of "com.sun.faces.config.ConfigureListener"" Watch "Invalid Warning of "com.sun.faces.config.ConfigureListener"" New topic
Author

Invalid Warning of "com.sun.faces.config.ConfigureListener"

Karanjit Singh
Greenhorn

Joined: Oct 17, 2010
Posts: 15
Hi,

I am very new to JSF Technology. I have made a simple "Hello World" Application using JSF, with supporting Eclipse Galileo & Tomcat 6.0
The good thing is, application is running perfectly. But the bad thing which I don't like, is I am getting a Warning regarding "com.sun.faces.config.ConfigureListener" as follows:

INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/jsfProject'
Oct 18, 2010 2:22:37 AM org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added
Oct 18, 2010 2:22:37 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Oct 18, 2010 2:22:38 AM 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.
Oct 18, 2010 2:22:38 AM 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.

Also, above thing is repeating continuously. Please help me out in this.

Thanks in Advance

Karanjeet Singh
Ilari Moilanen
Ranch Hand

Joined: Apr 15, 2008
Posts: 198
It is not a warning. It is a info. It says so in the beginning of the line.

So your problem does not exist.

EDIT: unless by "above thing is repeating continuously" you mean that Tomcat keeps on repeating the line over and over again infinitely but I doubt that.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

It's a bloody nuisance is what it is. But I did some digging a while back, and there doesn't seem to be any way in Tomcat to shut it up.


Customer surveys are for companies who didn't pay proper attention to begin with.
Karanjit Singh
Greenhorn

Joined: Oct 17, 2010
Posts: 15
Thanks Tim & Ilari for your replies.

@ Tim: Yes you are right its just an Info message. But I dont want this to be repeated infinitely. Apparently what I am getting is Tomcat is Initializing Mojarra again and again due to which I am getting this message repeatedly.

@ Ilari: There must be some way out with the help of which we can stop this messages.

If I am doing anything wrong. Please correct me. Any suggestions will be highly appreciable.

Following are my faces-config.xml & web.xml

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>jsfProject</display-name>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<description>Avoid refreshing and compiling of pages because of timestamp</description>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>-1</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>


faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">

<managed-bean>
<description>This is just a Test Page</description>
<managed-bean-name>testBean</managed-bean-name>
<managed-bean-class>test.TestBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

<navigation-rule>
<from-view-id>*</from-view-id>
</navigation-rule>

<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>
Karanjit Singh
Greenhorn

Joined: Oct 17, 2010
Posts: 15
Hellooooooo....Is there anyone, who can help me out at this???

Regards

Karanjeet Singh
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

It isn't just Mojarra. JSF1.2 gives this message as well. I've been snarling at it for years.

It's not actually initializing anything twice. It's saying that it was going to configure the listener, but the listener was already configured (so if something is wrong with the configuration, it's someone else's fault).

Much as I'd like to be able to suppress this message, I've never found a way to outside of modifying the infrastructure source code.
Karanjit Singh
Greenhorn

Joined: Oct 17, 2010
Posts: 15
Thanks Tim for your reply,

I will do more research on this and revert back to you.

Regards

Karanjeet Singh
 
 
subject: Invalid Warning of "com.sun.faces.config.ConfigureListener"