Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Karanjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18167
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Karanjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hellooooooo....Is there anyone, who can help me out at this???

Regards

Karanjeet Singh
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18167
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your reply,

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

Regards

Karanjeet Singh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic