jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mahfouz, Ayman" <ayman.mahf...@citigroup.com>
Subject BasicAuthentication sample fails in WL 8.1
Date Thu, 20 May 2004 18:34:45 GMT
Here is the status on this:  (Please help)
* The issue does not seem to be pertinent to struts. I have a web app
deployed under WL 8.1 that has only one simple servlet in it: When I run
the cactus authentication example from eclipse it works and when I run
it from the web browser using ServletTestRunner it fails with the trace
given at bottom of email. Notice the
weblogic.security.acl.internal.AuthenticatedSubject.doAs in trace.

* I made a copy of the web app and deployed it in WL under different
context path and for this web app the test case does not even pass in
the IDE. Bizarre.

* I tried to turn on logging by placing a
cactus.logging.config=E:/log4j.properties in the cactus properties but I
do not get any extra logging. 

---------------------------------------------------------------
----- Here is the log4j.properties file contents:
---------------------------------------------------------------

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout 
log4j.appender.A1.layout.ConversionPattern=%r [%t] %-5p %C.%M() - %m%n

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=ALL, A1
log4j.category.org.apache.cactus = ALL, A1
log4j.category.servletunit = ALL, A1

---------------------------------------------------------------
----- and here is all the logging I get
---------------------------------------------------------------

May 20, 2004 11:19:02 AM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
WARNING: No credentials available for the 'myrealm' authentication realm
at localhost
May 20, 2004 11:19:02 AM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
WARNING: No credentials available for the 'myrealm' authentication realm
at localhost
May 20, 2004 11:20:59 AM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
INFO: Already tried to authenticate with 'myrealm' authentication realm
at localhost, but still receiving: HTTP/1.1 401 Unauthorized xxx
May 20, 2004 11:20:59 AM org.apache.commons.httpclient.HttpMethodBase
processAuthenticationResponse
INFO: Already tried to authenticate with 'myrealm' authentication realm
at localhost, but still receiving: HTTP/1.1 401 Unauthorized xxx

---------------------------------------------------------------
-----  Here is the trace of failure from running the test case
---------------------------------------------------------------

org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
results at
[http://localhost:7001/testWebAppCopy/ServletRedirectorSecure] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:92) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
org.apache.cactus.internal.client.ParsingException: Not a valid response
[401 Unauthorized xxx] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callG
etResult(DefaultHttpClient.java:211) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:87) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
results at
[http://localhost:7001/testWebAppCopy/ServletRedirectorSecure] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:92) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
org.apache.cactus.internal.client.ParsingException: Not a valid response
[401 Unauthorized xxx] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callG
etResult(DefaultHttpClient.java:211) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:87) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
results at
[http://localhost:7001/testWebAppCopy/ServletRedirectorSecure] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:92) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
org.apache.cactus.internal.client.ParsingException: Not a valid response
[401 Unauthorized xxx] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callG
etResult(DefaultHttpClient.java:211) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody0(DefaultHttpClient.java:87) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t_aroundBody1$advice(DefaultHttpClient.java:206) at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTes
t(DefaultHttpClient.java) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
WebTest(HttpProtocolHandler.java:159) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody0(HttpProtocolHandler.java:80) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test_aroundBody1$advice(HttpProtocolHandler.java:206) at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.run
Test(HttpProtocolHandler.java) at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes
tCaseCaller.java:144) at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract
CactusTestCase.java:215) at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus
TestCase.java:133) at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.
java:315) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv
letTestRunner.java:193) at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi
ce(ServletTestRunner.java:124) at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
r.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1053) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:387) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:305) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6291) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:317) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3575) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2573) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)


Mime
View raw message