I wonder if the difference is that you're not redirecting to a new page?

On 09/12/2008, at 11:42 PM, Estevam Henrique Portela Mota e Silva wrote:

Geoff,

I've copied your code and applied it to my application, no problems were
found. This is exactly what I did:

Src:

   @Inject
   private RequestGlobals requestGlobals;

   @OnEvent(value = "onActionFromIndex")
   public void onActionFromLogoff(){
Session session = requestGlobals.getRequest().getSession(false);
       if(session != null){
           _visit = null;
           session.invalidate();
       }
   }

Are you sure that the problem is related only with this piece of code?

On Tue, Dec 9, 2008 at 9:15 AM, Geoff Callender <
[EMAIL PROTECTED]> wrote:

Is no-one else seeing this problem? Is there an obvious solution I've
missed?


On 08/12/2008, at 11:05 PM, Geoff Callender wrote:

-1 (non-binding)

My tests are failing on one thing only - I can't successfully log out.

In my Layout component there's an ActionLink with id LogOut. Here's the
event handler:

      Object onActionFromLogOut() {
_logger.info(_visit.getMyLoginId() + " is logging out.");
              Session session =
_requestGlobals.getRequest().getSession(false);
              if (session != null) {
                      session.invalidate();
              }
              return LogIn.class;
      }

It results in the exception below. If I comment out session.invalidate();
then there is no exception.

22:55:12,591 INFO  [Layout] secofr is logging out.
22:55:12,597 ERROR [[default]] Servlet.service() for servlet default threw
exception
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
      at
org.apache.catalina.connector.Request.doGetSession(Request.java: 2301)
      at
org.apache.catalina.connector.Request.getSession(Request.java:2075)
      at
org .apache .catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
      at
org .apache .tapestry5 .internal.services.RequestImpl.getSession(RequestImpl.java:99)
      at $Request_11e16734cdd.getSession($Request_11e16734cdd.java)
      at $Request_11e16734c92.getSession($Request_11e16734c92.java)
      at
org .apache .tapestry5 .internal .services .SessionApplicationStatePersistenceStrategy .requestDidComplete (SessionApplicationStatePersistenceStrategy.java:126)
      at
org .apache .tapestry5 .internal .services .EndOfRequestListenerHubImpl.fire(EndOfRequestListenerHubImpl.java: 40)
      at
$ EndOfRequestListenerHub_11e16734ca9 .fire($EndOfRequestListenerHub_11e16734ca9.java)
      at
org.apache.tapestry5.services.TapestryModule $3.service(TapestryModule.java:625)
      at
$ RequestHandler_11e16734cac.service($RequestHandler_11e16734cac.java)
      at
org.apache.tapestry5.services.TapestryModule $2.service(TapestryModule.java:611)
      at
$ RequestHandler_11e16734cac.service($RequestHandler_11e16734cac.java)
      at
org .apache .tapestry5 .internal .services.StaticFilesFilter.service(StaticFilesFilter.java:85)
      at
$ RequestHandler_11e16734cac.service($RequestHandler_11e16734cac.java)
      at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter $2.invoke(CheckForUpdatesFilter.java:93)
      at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter $2.invoke(CheckForUpdatesFilter.java:84)
      at
org .apache .tapestry5 .ioc .internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
      at
org .apache .tapestry5 .internal .services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java: 106)
      at
$ RequestHandler_11e16734cac.service($RequestHandler_11e16734cac.java)
      at
$ RequestHandler_11e16734ca3.service($RequestHandler_11e16734ca3.java)
      at
org.apache.tapestry5.services.TapestryModule $16.service(TapestryModule.java:1007)
      at
org .apache .tapestry5 .internal .services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
      at
$ HttpServletRequestFilter_11e16734ca2 .service($HttpServletRequestFilter_11e16734ca2.java)
      at
$ HttpServletRequestHandler_11e16734ca4 .service($HttpServletRequestHandler_11e16734ca4.java)
      at
$ HttpServletRequestHandler_11e16734ca1 .service($HttpServletRequestHandler_11e16734ca1.java)
      at
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java: 179)
      at
org .apache .catalina .core .ApplicationFilterChain .internalDoFilter(ApplicationFilterChain.java:235)
      at
org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206)
      at
org .jboss .web .tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java: 96)
      at
org .apache .catalina .core .ApplicationFilterChain .internalDoFilter(ApplicationFilterChain.java:235)
      at
org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206)
      at
org .apache .catalina .core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at
org .apache .catalina .core.StandardContextValve.invoke(StandardContextValve.java:175)
      at
org .jboss .web .tomcat .security .SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at
org .jboss .web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 84)
      at
org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at
org .apache .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at
org .jboss .web .tomcat .service .jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at
org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109)
      at
org .apache .catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at
org .apache.coyote.http11.Http11Processor.process(Http11Processor.java: 844)
      at
org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583)
      at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 446)
      at java.lang.Thread.run(Thread.java:613)

Geoff

On 05/12/2008, at 5:58 AM, Howard Lewis Ship wrote:

I've created and uploaded a release of Tapestry 5.0.18, ready to be voted
upon.

We've had the combined experience period of 5.0.16 and 5.0.17 to vet
the stability and correctness of this release,
and 5.0.18 is ready to be the final Tapestry 5.0 release.  If you
disagree, please vote -1 and offer a plan to bring
5.0.18 to readiness.

A +1 vote is to make  5.0.18 available as the FINAL 5.0 release.

The files are uploaded to:

http://people.apache.org/~hlship/tapestry-releases/<http://people.apache.org/%7Ehlship/tapestry-releases/ >

and a Maven repository:

http://people.apache.org/~hlship/tapestry-ibiblio-rsynch-repository/ <http://people.apache.org/%7Ehlship/tapestry-ibiblio-rsynch-repository/ >

Please examine these files to determine if a new preview release,
5.0.18, is ready.

I've also created a 5.0.18 tag in Subversion:

http://svn.apache.org/viewvc/tapestry/tapestry5/tags/releases/5.0.18/

On a successful vote, I'll move the files from these directories to
the proper distribution directories.

Vote will run for seven days (until Thu 11 2008); on success I'll move the voted artifacts into place and send out appropriate notifications.

--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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




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




--
Regards,

Estevam Henrique Portela Mota e Silva
Handicapped Auditory = deaf
[EMAIL PROTECTED] / [EMAIL PROTECTED]
Programmer Java and Tapestry
Brazil - Fortaleza / CE


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

Reply via email to