com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a BehaviorConfig

Mahmoud Saleh picture Mahmoud Saleh · Dec 10, 2012 · Viewed 7.6k times · Source

i am trying to use jsf 2.1.14 with icefaces 3.2.0 and when trying to run the application, i am getting the following exception:

com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a BehaviorConfig
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a BehaviorConfig
    at com.sun.faces.facelets.tag.AbstractTagLibrary$UserBehaviorHandlerFactory.<init>(AbstractTagLibrary.java:453)
    at com.sun.faces.facelets.tag.AbstractTagLibrary.addBehavior(AbstractTagLibrary.java:601)
    at com.sun.faces.facelets.tag.TagLibraryImpl.putBehavior(TagLibraryImpl.java:94)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processBehavior(FaceletTaglibConfigProcessor.java:396)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:367)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
    ... 11 more
Caused by: java.lang.NoSuchMethodException: org.icefaces.ace.component.ajax.AjaxBehaviorHandler.<init>(javax.faces.view.facelets.BehaviorConfig)
    at java.lang.Class.getConstructor0(Class.java:2706)
    at java.lang.Class.getConstructor(Class.java:1657)
    at com.sun.faces.facelets.tag.AbstractTagLibrary$UserBehaviorHandlerFactory.<init>(AbstractTagLibrary.java:451)
    ... 18 more
Dec 10, 2012 10:35:15 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a BehaviorConfig
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Must have a Constructor that takes in a BehaviorConfig
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
    ... 10 more
Caused by: javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a BehaviorConfig
    at com.sun.faces.facelets.tag.AbstractTagLibrary$UserBehaviorHandlerFactory.<init>(AbstractTagLibrary.java:453)
    at com.sun.faces.facelets.tag.AbstractTagLibrary.addBehavior(AbstractTagLibrary.java:601)
    at com.sun.faces.facelets.tag.TagLibraryImpl.putBehavior(TagLibraryImpl.java:94)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processBehavior(FaceletTaglibConfigProcessor.java:396)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:367)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
    ... 11 more
Caused by: java.lang.NoSuchMethodException: org.icefaces.ace.component.ajax.AjaxBehaviorHandler.<init>(javax.faces.view.facelets.BehaviorConfig)
    at java.lang.Class.getConstructor0(Class.java:2706)
    at java.lang.Class.getConstructor(Class.java:1657)
    at com.sun.faces.facelets.tag.AbstractTagLibrary$UserBehaviorHandlerFactory.<init>(AbstractTagLibrary.java:451)
    ... 18 more
Dec 10, 2012 10:35:15 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Dec 10, 2012 10:35:15 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/XenoBillingWeb] startup failed due to previous errors
Dec 10, 2012 10:35:15 AM javax.faces.FactoryFinder$FactoryManager getFactory
SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
Dec 10, 2012 10:35:15 AM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. 
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
    at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:131)
    at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:328)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

following is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>My APP</display-name>
  <listener>
    <listener-class>
        org.springframework.web.context.ContextLoaderListener
    </listener-class>
  </listener>
  <listener>
    <listener-class>
        org.springframework.web.context.request.RequestContextListener
    </listener-class>
  </listener>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
        classpath:META-INF/spring/applicationContext.xml
        classpath:META-INF/spring/applicationSecurity.xml
        </param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
    <param-value>
    /WEB-INF/springsecurity.taglib.xml;/WEB-INF/utils.taglib.xml
    </param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Production</param-value>
  </context-param>
  <welcome-file-list>
    <welcome-file>/</welcome-file>
  </welcome-file-list>
  <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>

  <filter>
    <filter-name>hibernateFilter</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
    <init-param>
      <param-name>sessionFactoryBeanName</param-name>
      <param-value>sessionFactory</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>hibernateFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>

  <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>
            org.springframework.web.filter.DelegatingFilterProxy
        </filter-class>
  </filter>
  <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
  <filter>
    <filter-name>Pretty Filter</filter-name>
    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    <init-param>
      <param-name>logLevel</param-name>
      <param-value>ERROR</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Pretty Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
  </filter-mapping>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <context-param>
    <param-name>com.icesoft.faces.synchronousUpdate</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.icefaces.connectionLostRedirectURI</param-name>
    <param-value>/login</param-value>
  </context-param>
  <context-param>
    <param-name>org.icefaces.sessionExpiredRedirectURI</param-name>
    <param-value>/login</param-value>
  </context-param>
  <context-param>
    <param-name>com.ocpsoft.pretty.DEVELOPMENT</param-name>
    <param-value>false</param-value>
  </context-param>
  <servlet>
    <servlet-name>Resource Servlet</servlet-name>
    <servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Resource Servlet</servlet-name>
    <url-pattern>/xmlhttp/*</url-pattern>
  </servlet-mapping>

  <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>




  <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/error</location>
  </error-page>
  <error-page>
    <error-code>400</error-code>
    <location>/error</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/pageNotFound</location>
  </error-page>
  <context-param>
    <param-name>org.icefaces.ace.theme</param-name>
    <param-value>rime</param-value>
  </context-param>


       <context-param>
         <param-name>quartz:shutdown-on-unload</param-name>
         <param-value>true</param-value>
     </context-param>

     <context-param>
         <param-name>quartz:wait-on-shutdown</param-name>
         <param-value>true</param-value>
     </context-param>

     <context-param>
         <param-name>quartz:start-on-load</param-name>
         <param-value>true</param-value>
     </context-param>

     <listener>
         <listener-class>com.myapp.web.control.ContextListener</listener-class>
     </listener>

</web-app>

please advise how to fix it, thanks.

Answer

Mahmoud Saleh picture Mahmoud Saleh · Dec 10, 2012

issue resolved after installing latest icefaces eclipse plugin.