jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Problem with simple example using ServletRedirector.
Date Sat, 13 Sep 2003 19:00:27 GMT
Hi Gabriel,

I've just added a FAQ entry for this:

Question: When running my Cactus tests with JBoss 3.x, I get: 
          
java.lang.NoSuchMethodError: 
  org.apache.commons.httpclient.methods.GetMethod.setRequestHeader(
  Ljava/lang/String;Ljava/lang/String;)V at [...]

Solution:

JBoss 3.x bundles an old version of HttpClient and Cactus requires a
newer version. Just replace the HttpClient version in JBoss by the one
provided by Cactus.

Hope it helps,
-Vincent

-----Original Message-----
From: gabriel@swb.com.br [mailto:gabriel@swb.com.br] 
Sent: 02 July 2003 18:23
To: Cactus User Help
Subject: Problem with simple example using ServletRedirector.


I was trying to execute a simple example of ServletRedirector, but i'm
receiving the following output: 

  <?xml version="1.0" encoding="UTF-8" ?> 
- <testsuites> 
- <testsuite name="com.ctbc.j2ee.sav.motivo.test.TestSampleServlet"
tests="1" failures="0" errors="1" time="1,27"> 
- <testcase name="testSaveToSessionOK" time="0,77"> 
  <error
message="org.apache.commons.httpclient.methods.GetMethod.setRequestHeade
r(Ljava/lang/String;Ljava/lang/String;)V"
type="java.lang.NoSuchMethodError">java.lang.NoSuchMethodError:
org.apache.commons.httpclient.methods.GetMethod.setRequestHeader(Ljava/l
ang/String;Ljava/lang/String;)V at
org.apache.cactus.client.HttpClientConnectionHelper.dispatch24_connect(H
ttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1
k):142) at
org.apache.cactus.client.HttpClientConnectionHelper.around24_connect(Htt
pClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k)
:1218) at
org.apache.cactus.client.HttpClientConnectionHelper.connect(HttpClientCo
nnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj(1k):106) at
org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClie
nt.java;org/apache/cactus/util/log/LogAspect.aj(1k):186) at
org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHtt
pClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):109) at
org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpC
lient.java;org/apache/cactus/util/log/LogAspect.aj(1k):1218) at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
va;org/apache/cactus/util/log/LogAspect.aj(1k):104) at
org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase
.java:260) at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133) at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195) at
junit.framework.TestResult$1.protect(TestResult.java:106) at
junit.framework.TestResult.runProtected(TestResult.java:124) at
junit.framework.TestResult.run(TestResult.java:109) at
junit.framework.TestCase.run(TestCase.java:118) at
junit.framework.TestSuite.runTest(TestSuite.java:208) at
junit.framework.TestSuite.run(TestSuite.java:203) at
org.apache.cactus.server.runner.ServletTestRunner.dispatch92_run(Servlet
TestRunner.java;org/apache/cactus/util/log/LogAspect.aj(1k):161) at
org.apache.cactus.server.runner.ServletTestRunner.around92_run(ServletTe
stRunner.java;org/apache/cactus/util/log/LogAspect.aj(1k):1218) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java;org/apache/cactus/util/log/LogAspect.aj(1k):137) at
org.apache.cactus.server.runner.ServletTestRunner.dispatch91_doGet(Servl
etTestRunner.java;org/apache/cactus/util/log/LogAspect.aj(1k):121) at
org.apache.cactus.server.runner.ServletTestRunner.around91_doGet(Servlet
TestRunner.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java;org/apache/cactus/util/log/LogAspect.aj(1k):101) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509
) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:59
4) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:392) at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:56
5) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:619) at java.lang.Thread.run(Thread.java:536)</error> 
  </testcase> 
  </testsuite> 
  </testsuites> 

I am using JBoss 3.2.0 and cactus 1.4.1. 

I am already put the required jar's in CLASSPATH of my app and the
http-client jar that i'm put in CLASSPATH is that from the Cactus 1.4.1
dist. (commons-httpclient-2.0alpha1-20020606.jar)

Any ideas of what might be wrong? 

Thank's...
Gabriel Pereira Borges
Equipe de Desenvolvimento Java/J2EE
Cel.:  (34) 9102-3477 

_____________________________________________
SofWareBrasil Soluções Integradas 
Fone/FAX: +55-34-3222-4242 - Ramal 239
Av. Cesário Alvim 2258 CEP: 38400-696 Uberlândia-MG



Mime
View raw message