1 Reply Latest reply on Feb 18, 2009 8:37 AM by ssilvert

    Exception while accessing JSFUnitTest

    anoopp

      Hi,
      I am getting the below exception while accessing JSFUnit test class documented here http://www.jboss.org/jsfunit/gettingstarted.html

      Exception:

      org/apache/commons/io/IOUtils.toByteArray(Ljava/io/InputStream;)[B

      java.lang.NoSuchMethodError: org/apache/commons/io/IOUtils.toByteArray(Ljava/io/InputStream;)[B
      at com.gargoylesoftware.htmlunit.WebResponseData.getBody(WebResponseData.java:127)
      at com.gargoylesoftware.htmlunit.WebResponseData.(WebResponseData.java:61)
      at com.gargoylesoftware.htmlunit.StringWebResponse.getWebResponseData(StringWebResponse.java:49)
      at com.gargoylesoftware.htmlunit.StringWebResponse.(StringWebResponse.java:58)
      at com.gargoylesoftware.htmlunit.WebClient.(WebClient.java:183)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
      at org.jboss.jsfunit.framework.WebConversationFactory.makeWebClient(WebConversationFactory.java:133)
      at org.jboss.jsfunit.framework.WebClientSpec.(WebClientSpec.java:113)
      at org.jboss.jsfunit.framework.WebClientSpec.(WebClientSpec.java:91)
      at org.jboss.jsfunit.framework.WebClientSpec.(WebClientSpec.java:75)
      at com.manh.eem.JSFUnitTest.testInitialPage(JSFUnitTest.java:26)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:42)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:48)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:122)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:766)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:674)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

        • 1. Re: Exception while accessing JSFUnitTest
          ssilvert

          Hi,

          First, since you are using WebSphere, you will need to see this if you haven't already: http://www.jboss.org/community/docs/DOC-10969

          This exception looks like it is loading the wrong version of commons-io.jar.

          I'm going to update the Getting Started page in the next day or two to reflect the jars that are needed for JSFUnit 1.0 GA. Here is the draft of that section of the new document:
          =============================================
          Here are the jars you will need in your WEB-INF/lib. Some of these jars will not be needed if your container or application already provides them.

          jboss-jsfunit-core-1.0.0.jar
          aspectjrt-1.2.1.jar
          cactus-13-1.7.1.jar
          junit-3.8.1.jar
          nekohtml-1.9.9.jar
          htmlunit-2.4.jar
          htmlunit-core-js-2.4.jar
          cssparser-0.9.5.jar
          commons-httpclient-3.1.jar
          commons-io-1.4.jar.jar
          sac-1.3.jar
          commons-lang-2.4.jar
          commons-codec-1.3.jar
          commons-logging-1.1.1.jar
          commons-collections-3.2.jar
          cactus-ant-13-1.7.1.jar
          cargo-0.5.jar
          ant-1.5.4.jar

          If not already included in your container, you will also need xerces and xalan. If already installed, you should prefer the container's installed version. You should never include these jars in your WAR if you are running JBoss AS 5.x.

          xercesImpl-2.8.1.jar
          xalan-2.7.0.jar

          ===============================================
          Hope that helps. JSFUnit GA should be released before Monday.

          Stan