jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis, Lonnie R" <lonnie.le...@eds.com>
Subject RE: Cactus/Maven problem
Date Wed, 26 Oct 2005 19:18:18 GMT
Kenney,
Thanks again for the help. Actually, that "<!DOCTYPE" stuff in the web
response is the first characters of the filter response. In this
example, I have a filter that checks the browser type. If the browser is
not a browser supported in our application, it forwards to an error
page. That's what this is doing, my test case is hard-coding an invalid
browser type, and the result that is being output here is the first
characters of that error HTML output. Make sense? Is this what the
cactus test should be doing?
As for the version of cactus, Maven downloaded the stuff for me, so it
should all be of the same version.
Thanks again,
Lonnie

-----Original Message-----
From: Kenney Westerhof [mailto:forge@neonics.com] 
Sent: Wednesday, October 26, 2005 12:08 PM
To: Cactus Users List
Subject: RE: Cactus/Maven problem

On Wed, 26 Oct 2005, Lewis, Lonnie R wrote:

Hm. That's odd. From examining the sourcecode, it doesn't handle DTD.
(not sure which version you're using).

It trims the output and checks if it starts with <webresult>, but a
DOCTYPE declaration is found instead.

I can only think of the following two causes:

- cactus added support for a DOCTYPE and you're using a newer version of
cactus on the server than on the client;
- you've got some weird tomcat settings that add DOCTYPE automatically.

Btw, if you point your browser at that url (where you get the blank
page),
and you do 'view source', i think you'll see the <webresult> tag.

Again, I'm not sure what causes this, perhaps some more experienced
user/developer can help you with that.

-- Kenney

> Thanks for the reply, Kenney. Running "clean:clean" as you suggested
> cleaned up the problem files. Thanks for the tip.
>
> Here is the stack trace:
>     [cactus] Testcase: testDoRequiredBrowser took 15.753 sec
>     [cactus]    Caused an ERROR
>     [cactus] Failed to get the test results at
> [http://localhost:8080/MyTest-cactus/test/filterRedirector.jsp]
>     [cactus] org.apache.cactus.util.ChainedRuntimeException: Failed to
> get the test results at
> [http://localhost:8080/MyTest-cactus/test/filterRedirector.jsp]
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
> t_aroundBody0(DefaultHttpClient.java:92)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
> t_aroundBody1$advice(DefaultHttpClient.java:288)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
> t(DefaultHttpClient.java)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
> WebTest(HttpProtocolHandler.java:159)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
> Test_aroundBody0(HttpProtocolHandler.java:80)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
> Test_aroundBody1$advice(HttpProtocolHandler.java:288)
>     [cactus]    at
>
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
> Test(HttpProtocolHandler.java)
>     [cactus]    at
>
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
> tCaseCaller.java:144)
>     [cactus]    at
>
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
> CactusTestCase.java:215)
>     [cactus]    at
>
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
> TestCase.java:133)
>     [cactus] org.apache.cactus.internal.client.ParsingException: Not a
> valid response. First 100 characters of the reponse: [
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus]
>     [cactus] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org]
>
> >From what I've read, I agree that the problem is connecting to
Tomcat. I
> also get this error in the sysout:
>     [cactus]
> -----------------------------------------------------------------
>     [cactus] Running tests against Tomcat 5.0.28 @
http://localhost:8080
>     [cactus]
> -----------------------------------------------------------------
>     [cactus] [VERBOSE] Starting up container
>     [cactus] [DEBUG] Finding class
> org.apache.cactus.integration.ant.container.ContainerRunner
>     [cactus] [DEBUG] Class
> org.apache.cactus.integration.ant.container.ContainerRunner loaded
from
> ant loader
>     [cactus] [DEBUG] Class java.net.HttpURLConnection loaded from
parent
> loader
>     [cactus] [DEBUG] Class java.lang.Runnable loaded from parent
loader
>     [cactus] [DEBUG] Class java.lang.InterruptedException loaded from
> parent loader
>     [cactus] [DEBUG] Failed to connect to
>
[http://localhost:8080/MyTest-cactus/ServletRedirector?Cactus_Service=RU
> N_TEST] (Connection refused: connect)
>
> As these test are running, I can bring up a browser and enter in the
> URL:
>
http://localhost:8080/MyTest-cactus/ServletRedirector?Cactus_Service=RUN
> _TEST
> I get a blank page,  but no error.
> I have also tried: http://localhost:8080/
> MyTest-cactus/test/filterRedirector.jsp
> I also get a response, but it is an error containing: "Missing service
> name parameter [Cactus_Service] in HTTP request."
>
> I don't know, any ideas?
>
> Thanks again.
> -Lonnie
>
> -----Original Message-----
> From: Kenney Westerhof [mailto:forge@neonics.com]
> Sent: Wednesday, October 26, 2005 3:45 AM
> To: Cactus Users List
> Subject: Re: Cactus/Maven problem
>
> On Tue, 25 Oct 2005, Lewis, Lonnie R wrote:
>
> Hi,
>
> A ChainedRuntimeException is typically thrown from Ant, IIRC, which
> indicates a client side problem - it probably can't connect or
> something.
>
> Have you tried running the tests without maven? Maybe you can run with
> -X
> and see more of the stacktrace - it should mention the reason.
>
> Also, files ending up in the WAR that you didn't specify (you did a
> maven
> clean:clean?)  are probably the result of the cactifyEar ant task.
> But logging.properties files on the server might just not help you
> since this seems to be a client side problem.
>
> Hope this helps a bit - maybe you can post the stacktrace here?
>
> -- Kenney
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message