2 Replies Latest reply on Jul 20, 2007 8:43 AM by Maksim Kaszynski

    ajax4jsf 1.1.1  x  facelets 1.2  x  jsf 1.2

    Daniel Noto Paiva Newbie

      Does the ajax4jsf works with facelets 1.2 and jsf 1.2 ?

      here says that not work:
      http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/docs/devguide/en/html_single/index.html#InvokeOnComponentUsingWithJSF1.2

      and here says that work:
      http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/docs/devguide/en/html_single/index.html#Supported%20JavaServer%20Faces%20Implementations

      And now work or no ?
      I think that doesn't work because when I try to use give the following error:

      java.io.IOException: Error parsing [jar:file:/home/daniel/desenvol/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/sac/WEB-INF/lib/ajax4jsf-1.1.1.jar!/META-INF/a4j.taglib.xml]:
      at com.sun.facelets.config.TagLibraryConfig.create(TagLibraryConfig.java:417)
      at com.sun.facelets.config.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:438)
      at com.sun.facelets.webapp.WebAppConfig.initializeTagLibraries(WebAppConfig.java:100)
      at com.sun.facelets.webapp.WebAppConfig.(WebAppConfig.java:37)
      at com.sun.facelets.webapp.FaceletFilter.init(FaceletFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
      at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
      at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:77)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
      at org.apache.catalina.core.StandardService.start(StandardService.java:450)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
      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:294)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/home/daniel/desenvol/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/sac/WEB-INF/lib/ajax4jsf-1.1.1.jar!/META-INF/a4j.taglib.xml@15,8]
      at com.sun.facelets.config.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:383)
      at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
      at com.sun.facelets.config.TagLibraryConfig.create(TagLibraryConfig.java:414)
      ... 22 more
      Caused by: org.xml.sax.SAXParseException: The content of element type "tag" is incomplete, it must match "(tag-name,handler-class?,(component|converter|validator|source))".
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      ... 37 more
      16/06/2007 19:15:49 com.sun.facelets.config.TagLibraryConfig loadImplicit
      SEVERE: Error Loading Library: jar:file:/home/daniel/desenvol/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/sac/WEB-INF/lib/richfaces-3.0.1.jar!/META-INF/rich.taglib.xml
      java.io.IOException: Error parsing [jar:file:/home/daniel/desenvol/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/sac/WEB-INF/lib/richfaces-3.0.1.jar!/META-INF/rich.taglib.xml]:
      at com.sun.facelets.config.TagLibraryConfig.create(TagLibraryConfig.java:417)
      at com.sun.facelets.config.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:438)
      at com.sun.facelets.webapp.WebAppConfig.initializeTagLibraries(WebAppConfig.java:100)
      at com.sun.facelets.webapp.WebAppConfig.(WebAppConfig.java:37)
      at com.sun.facelets.webapp.FaceletFilter.init(FaceletFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
      at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
      at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:77)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
      at org.apache.catalina.core.StandardService.start(StandardService.java:450)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
      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:294)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/home/daniel/desenvol/java/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/sac/WEB-INF/lib/richfaces-3.0.1.jar!/META-INF/rich.taglib.xml@53,8]
      at com.sun.facelets.config.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:383)
      at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
      at com.sun.facelets.config.TagLibraryConfig.create(TagLibraryConfig.java:414)
      ... 22 more
      Caused by: org.xml.sax.SAXParseException: The content of element type "tag" is incomplete, it must match "(tag-name,handler-class?,(component|converter|validator|source))".
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      ... 37 more

        • 1. Re: ajax4jsf 1.1.1  x  facelets 1.2  x  jsf 1.2
          Mike K Newbie

          I got the following setup and its working flawless:

          jsf1.2(1.2_02-b03-FCS) , facelets (1.1.12), ajax4jsf (1.1.2_SNAPSHOT) + richfaces (3.0.2_SNAPSHOT)

          I got it running on a tomcat 5.5.20 - this does work as I'm using facelets and no jsps ;)

          I needed to change the faces-config.xml due to the view-handler change:
          <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

          and in the web.xml the first filter has to be:

          <!-- ************************ AJAX4JSF Filter **************************** -->
          <!-- If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others. -->

          <display-name>Ajax4jsf Filter</display-name>
          <filter-name>ajax4jsf</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
          <init-param>
          <param-name>forceparser</param-name>
          <param-value>false</param-value>
          </init-param>

          <filter-mapping>
          <filter-name>ajax4jsf</filter-name>
          <servlet-name>Faces Servlet</servlet-name>
          REQUEST
          FORWARD
          INCLUDE
          </filter-mapping>


          ...but to me your error looks more like a taglib parsing problem in either richfaces or a4j!?!?! Maybe you schould check those files inside your jars...


          • 2. Re: ajax4jsf 1.1.1  x  facelets 1.2  x  jsf 1.2
            Maksim Kaszynski Apprentice

            Actually the problem is that Facelets 1.2Dev Taglib XML Schema differs from 1.1.
            As Facelets 1.2 version hasn't been released as stable yet, currently we do not support it.