0 Replies Latest reply on Sep 24, 2010 8:19 AM by abhijit singh

    problem in running JSF2.0 with a4j

    abhijit singh Newbie

      I am running a simple JSF2.0 app with RichFaces3.3 but my app is not working  and when i m using it without richfaces it works..i m using Eclipse

       

      Sep 24, 2010 5:39:29 PM org.apache.catalina.core.AprLifecycleListener init
      INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;D:\app\admin\product\11.1.0\client_2\bin;D:\product\11.1.0\client_1;C:\Program Files\ATI Technologies\ATI.ACE;C:\apache-ant-1.8.1-bin\apache-ant-1.8.1/bin;C:\Program Files\QuickTime\QTSystem\
      Sep 24, 2010 5:39:29 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
      WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jsf2.0' did not find a matching property.
      Sep 24, 2010 5:39:30 PM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Sep 24, 2010 5:39:30 PM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 1186 ms
      Sep 24, 2010 5:39:30 PM org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      Sep 24, 2010 5:39:30 PM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
      Sep 24, 2010 5:39:31 PM com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Initializing Mojarra 2.0.3 (SNAPSHOT 20100625) for context '/jsf2.0'
      Sep 24, 2010 5:39:35 PM com.sun.faces.config.ConfigManager initialize
      INFO: Unsanitized stacktrace from failed start...
      javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig
          at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:292)
          at com.sun.faces.facelets.tag.AbstractTagLibrary.addComponent(AbstractTagLibrary.java:522)
          at com.sun.faces.facelets.tag.TagLibraryImpl.putComponent(TagLibraryImpl.java:111)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:565)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:357)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:310)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:259)
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:334)
          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:220)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
          at org.apache.catalina.core.StandardService.start(StandardService.java:519)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoSuchMethodException: org.ajax4jsf.taglib.html.facelets.ActionParamHandler.<init>(javax.faces.view.facelets.ComponentConfig)
          at java.lang.Class.getConstructor0(Class.java:2706)
          at java.lang.Class.getConstructor(Class.java:1657)
          at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:290)
          ... 23 more
      Sep 24, 2010 5:39:35 PM org.apache.catalina.core.StandardContext listenerStart
      SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.ajax4jsf.taglib.html.facelets.ActionParamHandler.<init>(javax.faces.view.facelets.ComponentConfig)
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:351)
          at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:220)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
          at org.apache.catalina.core.StandardService.start(StandardService.java:519)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NoSuchMethodException: org.ajax4jsf.taglib.html.facelets.ActionParamHandler.<init>(javax.faces.view.facelets.ComponentConfig)
          at java.lang.Class.getConstructor0(Class.java:2706)
          at java.lang.Class.getConstructor(Class.java:1657)
          at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:290)
          at com.sun.faces.facelets.tag.AbstractTagLibrary.addComponent(AbstractTagLibrary.java:522)
          at com.sun.faces.facelets.tag.TagLibraryImpl.putComponent(TagLibraryImpl.java:111)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:565)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:357)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:310)
          at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:259)
          at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:334)
          ... 16 more
      Sep 24, 2010 5:39:35 PM org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      Sep 24, 2010 5:39:35 PM org.apache.catalina.core.StandardContext start
      SEVERE: Context [/jsf2.0] startup failed due to previous errors
      Sep 24, 2010 5:39:35 PM com.sun.faces.config.ConfigureListener contextDestroyed
      SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
          at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800)
          at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302)
          at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
          at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:312)
          at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)
          at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
          at org.apache.catalina.core.StandardService.start(StandardService.java:519)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Sep 24, 2010 5:39:35 PM oracle.jdbc.driver.OracleDriver registerMBeans
      SEVERE: Error while registering Oracle JDBC Diagnosability MBean.
      javax.management.MalformedObjectNameException: Invalid character '
      ' in value part of property
          at javax.management.ObjectName.construct(ObjectName.java:602)
          at javax.management.ObjectName.<init>(ObjectName.java:1403)
          at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:303)
          at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:213)
          at java.security.AccessController.doPrivileged(Native Method)
          at oracle.jdbc.driver.OracleDriver.<clinit>(OracleDriver.java:209)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at sun.misc.Service$LazyIterator.next(Service.java:271)
          at java.sql.DriverService.run(DriverManager.java:664)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:506)
          at java.sql.DriverManager.initialize(DriverManager.java:612)
          at java.sql.DriverManager.getDrivers(DriverManager.java:356)
          at org.apache.catalina.loader.JdbcLeakPrevention.clearJdbcDriverRegistrations(JdbcLeakPrevention.java:45)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:1960)
          at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1880)
          at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1798)
          at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:738)
          at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4812)
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
          at org.apache.catalina.core.StandardService.start(StandardService.java:519)
          at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Sep 24, 2010 5:39:35 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
      SEVERE: The web application [/jsf2.0] created a ThreadLocal with key of type [null] (value [com.sun.faces.util.Util$1@17b1d64]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
      

       

      my index file is

       

      <%
      response.sendRedirect("main.jsf");
      %>
      

       

      and my main.xhtml is

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich">
      <f:view>
      <h:head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      <title>Insert title here</title>
      </h:head>
      <h:body>
      
      <p>hello from facelets</p>
      
      <h:form>
        Some random data: <h:inputText id="ab"/><br/> 
        Some other data: <h:inputText/><br/>  
       <rich:calendar></rich:calendar>
                       
      </h:form>
      
      </h:body>
      </f:view>
      </html>
      

       

      my web.xml is

       

      <?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_2_5.xsd" 
      id="WebApp_ID" version="2.5">
      <context-param>
              <param-name>org.richfaces.SKIN</param-name>
              <param-value>blueSky</param-value>
          </context-param>
          <!-- Making the RichFaces skin spread to standard HTML controls -->
          <context-param>
              <param-name>org.richfaces.CONTROL_SKINNING</param-name>
              <param-value>enable</param-value>
          </context-param>
          <context-param>
             <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
             <param-value>com.sun.facelets.FaceletViewHandler</param-value>
        </context-param>
          
          <!-- Defining and mapping the RichFaces filter -->
          <filter>
              <display-name>RichFaces Filter</display-name>
              <filter-name>richfaces</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>
          </filter>
          <filter-mapping>
              <filter-name>richfaces</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
          </filter-mapping>
        <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        </servlet>
        <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <context-param>
          <param-name>javax.faces.PROJECT_STAGE</param-name>
          <param-value>Development</param-value>
        </context-param>
        <welcome-file-list>
          <welcome-file>index.jsp</welcome-file>
          <welcome-file>index.html</welcome-file>
        </welcome-file-list>
      </web-app>
      

      and my faces.config is

       

      <?xml version="1.0" encoding="UTF-8"?>
      
      <faces-config
          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-facesconfig_2_0.xsd"
          version="2.0">
      <application>   
                <view-handler>
                        org.ajax4jsf.application.AjaxViewHandler
              </view-handler>
      </application>
      </faces-config>