Repeating the message because I signed it (again, *sigh*), causing trouble -
sorry.
Hi,
we have done the tests and got the following results (7.0.11 and 7.0.26).
Thank you for taking the time:
=============================== Tomcat 7.0.11
==========================================
First call to portal:
["http-bio-8080"-exec-3 | INFO | 30-03 16:47:29:005] >>
requestInitialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:52)]
["http-bio-8080"-exec-3 | INFO | 30-03 16:47:29:005]
PortalRequest thread: 39 - "http-bio-8080"-exec-3
[de.srs.pen.portal.utils.server.servlet.PortalRequest.set(PortalRequest.java
:45)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:30:186]
Request Listener: Request Initialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:60)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:30:187]
requested URI:/portal-srs-standard/
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:62)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:30:187]
httpSession ID: 2D7D25B19BDC1A64DFFD61BBFD93CE7F
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:63)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:30:187]
principal:no principal
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:66)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:30:187] stack
trace:
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:67)]
java.lang.Exception
at
de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitiali
zed(PortalRequestListener.java:67)
at
org.apache.catalina.core.StandardContext.fireRequestInitEvent(StandardContex
t.java:5903)
at
org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormA
uthenticator.java:372)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent
icator.java:267)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:556)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100
)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:188)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:
302)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
at java.lang.Thread.run(Thread.java:662)
Credentials provided, login done
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:47:246]
Request Listener: Request Initialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:60)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:50:803]
requested URI:/portal-srs-standard/
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:62)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:50:803]
httpSession ID: 17E5174AC9E99DC97A44B0967E3E0219
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:63)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:50:804]
principal:srs/m.strauss
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:66)]
["http-bio-8080"-exec-3 | TRACE | 30-03 16:47:50:804] stack
trace:
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:67)]
java.lang.Exception
at
de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitiali
zed(PortalRequestListener.java:67)
at
org.apache.catalina.core.StandardContext.fireRequestInitEvent(StandardContex
t.java:5903)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:160)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:591)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100
)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http
11Protocol.java:188)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:
302)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
at java.lang.Thread.run(Thread.java:662)
=============================== Tomcat 7.0.26
========================================
[http-bio-8080-exec-3 | TRACE | 30-03 17:12:11:030]
Request Listener: Request Initialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:60)]
[http-bio-8080-exec-3 | TRACE | 30-03 17:12:11:813]
requested URI:/portal-srs-standard/
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:62)]
[http-bio-8080-exec-3 | TRACE | 30-03 17:12:11:814]
httpSession ID: AC7A464173A57BD6CB8602A906EFB0EF
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:63)]
[http-bio-8080-exec-3 | TRACE | 30-03 17:12:11:814]
principal:no principal
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:66)]
[http-bio-8080-exec-3 | TRACE | 30-03 17:12:11:833] stack
trace:
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:67)]
java.lang.Exception
at
de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitiali
zed(PortalRequestListener.java:67)
at
org.apache.catalina.core.StandardContext.fireRequestInitEvent(StandardContex
t.java:5934)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce
ssor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:579)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:
307)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
at java.lang.Thread.run(Thread.java:662)
[http-bio-8080-exec-3 | INFO | 30-03 17:12:12:745] <<
requestInitialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:93)]
[http-bio-8080-exec-7 | INFO | 30-03 17:13:26:084]
PortalRequest thread: 28 - http-bio-8080-exec-7
[de.srs.pen.portal.utils.server.servlet.PortalRequest.set(PortalRequest.java
:45)]
[http-bio-8080-exec-7 | TRACE | 30-03 17:13:44:622]
Request Listener: Request Initialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:60)]
[http-bio-8080-exec-7 | TRACE | 30-03 17:13:45:263]
requested URI:/portal-srs-standard/j_security_check
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:62)]
[http-bio-8080-exec-7 | TRACE | 30-03 17:13:45:486]
httpSession ID: AC7A464173A57BD6CB8602A906EFB0EF
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:63)]
[http-bio-8080-exec-7 | TRACE | 30-03 17:13:46:007]
principal:no principal
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:66)]
[http-bio-8080-exec-7 | TRACE | 30-03 17:13:46:831] stack
trace:
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:67)]
java.lang.Exception
at
de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitiali
zed(PortalRequestListener.java:67)
at
org.apache.catalina.core.StandardContext.fireRequestInitEvent(StandardContex
t.java:5934)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce
ssor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:579)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:
307)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
at java.lang.Thread.run(Thread.java:662)
[http-bio-8080-exec-7 | INFO | 30-03 17:13:49:228] <<
requestInitialized
[de.srs.pen.portal.utils.server.servlet.PortalRequestListener.requestInitial
ized(PortalRequestListener.java:93)]
Mit freundlichen Grüßen
Thomas Strauß
SRS PaperDynamix®
WE MAKE PAPER WORK
SRS-Management GmbH
Berliner Ring 93
64625 Bensheim
T +49 6251 85 424 - 20
F +49 6251 85 424 - 14
M +49 174 2110912
www.srs-management.de
www.srs-paperdynamix.de
HRB 25262 AG Darmstadt
Geschäftsführer: Detlev Homilius, Thomas Strauß
> -----Ursprüngliche Nachricht-----
> Von: Konstantin Kolinko [mailto:[email protected]]
> Gesendet: Freitag, 30. März 2012 13:10
> An: Tomcat Users List
> Betreff: Re: FormAuthentication Valve changes fail with RequestListeners?
>
> 2012/3/30 Thomas Strauß <[email protected]>:
> > Hi,
> >
> > thank you for the information.
> >
> > We have not succeeded so far. I want to give you some more information
> > what happens, the context.xml and the web.xml
> >
> > What we have changed versus the existing setup, working on 7.0.11
> > - We have moved the login.jsp into the protection domain (was outside
> > before). This did not remove the issue.
> > - We have changed the preemptiveAuthentication setting. This did not
> > remove the issue.
> >
> > This is the flow through the system that we can see:
> >
> > Client sends request to /portal
> >
> > /portal is not protected
> > /portal/jsp/main.jsp is welcome page and protected (see
> > web.xml)
> > portal context configures formauthentication on the protection
> > domain
> > Tomcat redirects/forwards incoming call to /jsp/login.jsp
> > (protected
> > resource)
> >
> > FormAuthentication Valve is called
> > Request Listener is called (expected: principal is null -> OK!)
>
> What is stacktrace at this point inside the listener?
> (e.g. (new Exception()).printStackTrace());
>
> Maybe you can compare 7.0.26 and 7.0.11.
>
>
> IIRC there was some refactoring with regards to where the valves are
> placed and how listeners are called In 7.0.22 changelog:
>
> "Error handling and request listeners are now handled in the
> StandardHostValve to ensure they wrap all Context level activity."
>
> Maybe something was missed there.
>
> > jsp/login.jsp is displayed, waiting for user User adds information,
> > press submit Client sends request to j_security_check is initiated by
> > browser with form data
> >
> > (something happens here?)
> >
> > Realm is called: Authentication succeeds, realm creates principal
> > Realm provides its own implementation of Principal Object
> > Realm uses different table-structure than original DataSource
> > Realm
> >
> > (something happens here?)
> >
> > Request Listener is called (expected: principal is not null -> FAILS!)
> >
> > (something happens here?)
> >
> > jsp/main.jsp is called, principal in request is not null -> can be
> > dumped to the JSP view
> >
> >
> > Following here is the used context.xml
> > (...)
> >
>
> BTW, if you want to run under debugger, the tips are here:
> https://wiki.apache.org/tomcat/FAQ/Developing#Debugging
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]