Thanks Jason!
 
The machines that run automated builds @ our place are different from the ones that host the application. Does that mean that i cannot automate unit testing along with our builds for now? /  until the next cactus release is available? Can someone suggest a work around?
Is downloading cactus source, modifying the source, and building cactus an option?
Not sure what i s'd be modifying though. Automating unit testing is one of the prime objectives for me in this quarter :-(
 
thanks,
karthik.

Jason Arndt <[EMAIL PROTECTED]> wrote:
Hi Karthik,

There is already an open bug on this problem. It can
be viewed at:
http://issues.apache.org/bugzilla/show_bug.cgi?id=17933

Jason

--- karthik Guru <[EMAIL PROTECTED]>wrote:
> I changed localhost to machine name in the code and
> ran into this error.
>
> "hostName" and "port" are 2 properties defined in
> the cactus.properties file.
> Moment i change hostName --> machine name i have a
> problem.
> As long as it remains "locahost" it is fine.
>
> Any idea as to what is going wrong? am able to
> access the application from another machine.
>
> If I do
>
:7001/ppo/home.jsp">http://:7001/ppo/home.jsp
> it works fine and am able to login.
>
> thanks
> karthik.
>
> public void login(WebRequest webRequest){
> String userName = getTestParameter(USERNAME_KEY);
> String password = getTestParameter(PASSWORD_KEY);
> FormAuthentication fa = new
> FormAuthentication(userName, password);
>
> webRequest.setRedirectorName("ServletRedirector");
> webRequest.setAuthentication(fa);
> String hostname=System.getProperty("hostName");
> String port=System.getProperty("port");
> String firstPart = hostname+":"+port;
> String secondPart = "/ppo";
> String thirdPart = "/home.jsp";
> System.out.println("Url: " + firstPart +
> secondPart + thirdPart);
> webRequest.setURL(firstPart, secondPart,
> thirdPart, null, null);
> }
>
>
> [junit] ------------- Standard Output
> ---------------
>
> [junit] user: mdoadmin, password: mdoadmin
>
> [junit] Created FormAuthentication
>
> [junit] Hostname:port got=sjain:7001
>
> [junit] Url: sjain:7001/ppo/home.jsp
>
> [junit] ------------- ----------------
> ---------------
>
> [junit] ------------- Standard Error
> -----------------
>
> [junit] log4j:ERROR No appenders could be found for
> category (org.apache.cac
>
> tus.client.initialization.ClientInitializer).
>
> [junit] log4j:ERROR Please initialize the log4j
> system properly.
>
> [junit] ------------- ----------------
> ---------------
>
> [junit] Testcase:
>
testMarkdownSearch(com.i2.mdo.unittest.MarkdownSearchTest)
>
> : Caused an ERROR
>
> [junit] Failed to authenticate the principal
>
> [junit]
> org.apache.cactus.util.ChainedRuntimeException:
> Failed to authentica
>
> te the principal
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.au
>
>
thenticate$ajcPostAround24(FormAuthentication.java;org/apache/cactus/util/log/Lo
>
> gAspect.aj(1k):314)
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.au
>
>
thenticate$ajcPostAround24$ajcVoidWrapper(FormAuthentication.java;org/apache/cac
>
> tus/util/log/LogAspect.aj(1k))
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.au
>
>
thenticate(FormAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k):1
>
> 151)
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.co
>
>
nfigure$ajcPostAround15(FormAuthentication.java;org/apache/cactus/util/log/LogAs
>
> pect.aj(1k):155)
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.co
>
>
nfigure$ajcPostAround15$ajcVoidWrapper(FormAuthentication.java;org/apache/cactus
>
> /util/log/LogAspect.aj(1k))
>
> [junit] at
>
org.apache.cactus.client.authentication.FormAuthentication.co
>
>
nfigure(FormAuthentication.java;org/apache/cactus/util/log/LogAspect.aj(1k):1151
>
> )
>
> [junit] at
>
org.apache.cactus.client.connector.http.HttpClientConnectionH
>
>
elper.connect$ajcPostAround9(HttpClientConnectionHelper.java;org/apache/cactus/u
>
> til/log/LogAspect.aj(1k):123)
>
> [junit] at
>
org.apache.cactus.client.connector.http.HttpClientConnectionH
>
>
elper.connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspe
>
> ct.aj(1k):1222)
>
> [junit] at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.cal
>
>
lRunTest(DefaultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):202)
>
> [junit] at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.doT
>
>
est$ajcPostAround7(DefaultHttpClient.java;org/apache/cactus/util/log/LogAspect.a
>
> j(1k):119)
>
> [junit] at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.doT
>
>
est(DefaultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj(1k):1222)
>
> [junit] at
>
org.apache.cactus.AbstractWebServerTestCase.runWebTest(Abstra
>
> ctWebServerTestCase.java:272)
>
> [junit] at
>
org.apache.cactus.AbstractWebServerTestCase.runGenericTest(Ab
>
> stractWebServerTestCase.java:214)
>
> [junit] at
>
org.apache.cactus.AbstractWebServerTestCase.runTest(AbstractW
>
> ebServerTestCase.java:287)
>
> [junit] at
>
org.apache.cactus.AbstractClientTestCase.runBare(AbstractClie
>
> ntTestCase.java:289)
>
> [junit] org.apache.cactus.client.ClientException:
> Failed to create Cookie he
>
> ader for [domain = [sjain, path =
> [/ppo/j_security_check, cookies = [[Lorg.apach
>
> e.commons.httpclient.Cookie;@69cb75]]. Turn on
> HttpClient logging for more infor
>
> mation about the error
>
> [junit] at
>
org.apache.cactus.client.connector.http.AbstractConnectionHel
>
>
per.createCookieHeader(AbstractConnectionHelper.java;org/apache/cactus/util/log/
>
> LogAspect.aj(1k):270)
>
> [junit] at
>
org.apache.cactus.client.connector.http.AbstractConnectionHel
>
>
per.getCookieString$ajcPostAround6(AbstractConnectionHelper.java;org/apache/cact
>
> us/util/log/LogAspect.aj(1k):221)
>
> [junit] at
>
org.apache.cactus.client.connector.http.AbstractConnectionHel
>
>
=== message truncated ===


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Reply via email to