1 Reply Latest reply on Apr 16, 2008 8:58 PM by ssilvert

    RichFacesClient Ajax4jsfClient - inconsistent

    kragoth

      I was working with the RichFacesClient but was having a few issues and the examples I'd been looking at were using the Ajax4jsfClient so I thought.... OK, I'll switch over and see if it makes a difference(I don't really expect it to but...hey I'm trying everything at the moment!!!)

      Well, I did this and I get a class not found exception

      java.lang.NoClassDefFoundError: org/ajax4jsf/framework/renderer/AjaxRendererUtils
       at org.jboss.jsfunit.richfaces.Ajax4jsfClient.buildEventOptions(Ajax4jsfClient.java:239)
      


      So, I had a look and it appeares that the Ajax4jsfClient is referring to the ?old? location for the AjaxRendererUtils and AjaxContainerRender...I think.

      Compare the imports from RichFacesClient and Ajax4jsfClient

      RichFacesClient:
      import org.ajax4jsf.renderkit.AjaxContainerRenderer;
      import org.ajax4jsf.renderkit.AjaxRendererUtils;
      


      Ajax4jsfClient:
      import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
      import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
      



      Is this right? Cause I can't find the framework package? Maybe this is just a relatively new move done in RichFaces 3.2.0 or something?


        • 1. Re: RichFacesClient Ajax4jsfClient - inconsistent
          ssilvert

          It is that way because package names changed when ajax4jsf was merged with RichFaces.
          http://wiki.jboss.org/wiki/JSFUnitWithRichFaces

          If you are using RichFaces 3.1.1 or higher then you need to use the RichFacesClient instead of the Ajax4JSFClient. RichFacesClient does extend Ajax4JSFClient but it overrides the relevant methods so it can find the classes in their new packages.

          If you were using Ajax4jsf 1.1.1 then the plain Ajax4JSFClient will still work. But if you are using RichFaces then always use the RichFaces client.

          Stan