jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Arndt <jarndt...@yahoo.com>
Subject Re: Error when using machine name instead of "localhost" with FormAuthentication
Date Thu, 26 Jun 2003 16:26:01 GMT
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 <karthik_guru2000@yahoo.com> 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://<machine-name>: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

Mime
View raw message