1 Reply Latest reply on Aug 28, 2003 1:19 PM by oscpro

    Problem with cactus and jboss

    rstranders Newbie

      Hi,

      I'm working on some EJB's, and I chose Cactus to test them. However,
      when I tried to run the Cactus example
      (http://jakarta.apache.org/cactus/integration/howto_tomcat.html), but
      it didn't work because of the Jboss' security. I then decided to
      package all needed jars and Servlets into one web-archive and deploy
      it.

      Now I get the following error when I call
      http://localhost:8080/testcactus/ServletTestRunner?suite=TestSampleServlet&xsl=cactus-report.xsl:

      org.apache.commons.httpclient.HttpMethod.setRequestHeader(Ljava/lang/String;Ljava/lang/String;)V

      java.lang.NoSuchMethodError:
      org.apache.commons.httpclient.HttpMethod.setRequestHeader(Ljava/lang/String;Ljava/lang/String;)V
      at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.dispatch50_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:152)
      at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.around50_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1222)
      at org.apache.cactus.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:114)
      .... and it goes on like this....

      Especially the first line fascinates me. Where does the package
      Ljava.lang.etc come from? I've never seen this before.

      I'm really desparate here, I've tried everything. Perhaps someone
      recognizes this problem and knows how to solve this?

      thanks in advance,

      Ruben

        • 1. Re: Problem with cactus and jboss
          oscpro Newbie

          Hi,

          I ran into the same problem.

          I solved this by replacing the commons-httpclient.jar file in $JBOSS_HOME/lib with the commons-httpclient-XXXX.jar file from the cactus distribution and restarting JBoss.

          I guess a more elegant solution would be to change the default JBoss classloading mechanism. I didn't try it though.

          Oscar.