3 Replies Latest reply on Apr 23, 2008 3:22 PM by Stan Silvert

    Setup JSFUnit with Seam

    Ben Groeneveld Newbie

      We're using Seam 2.0.1 in JBoss 4.2.0 on Jdk 1.5 with your 1.0-beta-1, but jtidy jtidy-8.0-20060801.131059-3.jar. Our test case throws an exception on:

      JSFClientSession client = new JSFClientSession("/login.seam");

      That is (below). Is specific setup required for Seam? Thanks!

      org.w3c.tidy.Tidy.setCharEncoding(I)V

      java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setCharEncoding(I)V
      at com.meterware.httpunit.parsing.JTidyHTMLParser.getParser(JTidyHTMLParser.java:74)
      at com.meterware.httpunit.parsing.JTidyHTMLParser.parse(JTidyHTMLParser.java:40)
      at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:255)
      at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1109)

        • 1. Re: Setup JSFUnit with Seam
          Stan Silvert Master

          As I said in the previous post, you should not be using the beta 1 version with Seam. You will need to build from SVN and use the SeamClient. Beware, that the SeamClient isn't ready yet and still won't be ready when I release Beta 2 this week.

          You also need to be aware of this note about processing instructions in xhtml:
          http://jira.jboss.com/jira/browse/JSFUNIT-70

          Stan

          • 2. Re: Setup JSFUnit with Seam
            Ben Groeneveld Newbie

            Thanks for the help then given this is still under dev. We built from SVN and get a bit further. Perhaps still some jtidy issues. On new SeamClient() we get:

            org.w3c.tidy.Tidy.setCharEncoding(I)V

            java.lang.NoSuchMethodError: org.w3c.tidy.Tidy.setCharEncoding(I)V
            at com.meterware.httpunit.parsing.JTidyHTMLParser.getParser(JTidyHTMLParser.java:74)

            In debug we see that this call produces the call (below). It looks like we somehow have more than one jtidy around. Recommendations? Thanks!

            private static Tidy getParser( URL url ) {
            Tidy tidy = new Tidy();
            tidy.setCharEncoding( org.w3c.tidy.Configuration.UTF8 );

            • 3. Re: Setup JSFUnit with Seam
              Stan Silvert Master

              Do you actually have two jtidy jars in your WAR? I seem to remember having that happen in a Maven build once. Cactus depends on JTidy so you might need to account for that when you play around with Maven dependencies.

              Stan