5 Replies Latest reply on May 4, 2009 7:16 PM by Stan Silvert

    JSFUnit Setup : java.lang.NoClassDefFoundError: com/gargoyle

    suhas valanjoo Newbie

      Hi all,

      I am a new user of JSFUnit and trying to make it work.

      I put these two jars in web-inf/lib of my war:
      jboss-jsfunit-core-1.0.0.GA.jar
      jboss-jsfunit-richfaces-1.0.0.GA.jar

      in web-inf I put timer-config.xml with following tag (only tag related code below)
      <faces-config>

      <phase-listener>org.jboss.jsfunit.framework.JSFTimerPhaseListener</phase-listener>

      </faces-config>

      And added this stuff to my web.xml
      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/timer-config.xml</param-value>
      </context-param>

      Last two configurations have been referred in http://www.jboss.org/community/docs/DOC-10970

      On launching the web app on Tomcat 6 and tried to look my web application's home page up, I get this 500 error

      01-05-09 10:50:13:002 - {ERROR} [/batWebApp].[Faces Servlet] Thread [http-8084-1]; Servlet.service() for servlet Faces Servlet threw exception
      java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/AjaxController
      at org.jboss.jsfunit.context.JSFUnitFacesContextFactory.isJSFUnitRequest(JSFUnitFacesContextFactory.java:74)
      at org.jboss.jsfunit.context.JSFUnitFacesContextFactory.getFacesContext(JSFUnitFacesContextFactory.java:58)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:133)
      at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:77)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.vzbi.vccas.webapp.LoginServletFilter.doFilter(LoginServletFilter.java:40)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
      at java.lang.Thread.run(Thread.java:595)


      Please help. I am just getting started in test driven development, so if this works, it would be a great impetus.

      Wishing you all a great weekend.

      Suhaas