facebook

Session expires after deployment

  1. MyEclipse Archived
  2.  > 
  3. ICEfaces Integration
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #280016 Reply

    kkaal
    Member

    Hi,
    I am trying to develop a ICEFaces web-application. My app has a funny behaviour:

    Whenever I deploy the application to Tomcat and try to call the first page in the browser, it tells me:

    SCHWERWIEGEND: Servlet.service() for servlet Persistent Faces Servlet threw exception
    javax.servlet.ServletException: Session expired
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:38)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

    Even if I restart Tomcat and / or the browser, it throws the same exception.

    The only way to work with the web-app is to restart the entire MyEclipse workbench.
    But the next time, I press the deploy-button, its the same thing again.

    I changed in the web.xml the param “javax.faces.STATE_SAVING_METHOD” from “server” to “client” but then, it does not do a proper deployment at all.

    Any hints or help?

    Thanks
    Klaus

    #280204 Reply

    kkaal
    Member

    This message has not been recovered.

    #280317 Reply

    This message has not been recovered.

    #280320 Reply

    kkaal
    Member

    This message has not been recovered.

    #280367 Reply

    kkaal
    Member

    This message has not been recovered.

    #280464 Reply

    Riyad Kalla
    Member

    Guys sorry about not getting back to you quicker, I googled around for this and it looks like an ICEfaces bug:
    http://www.icefaces.org/JForum/posts/list/3305.page

    You might want to followup on that page.

    #280485 Reply

    kkaal
    Member

    Hi Riyad,

    thanks for your reply. But that does not even touch my problem except for the message “Session expired”.

    I have no fault in the running code. It is in the deploy process. And it has to do with the MyEclipse environment. When I want to re-deploy my app to TOMCAT, I need to do the re-deploy (no error), close the MyEclipse programm, restart MyEclipse, start TOMCAT and then can use my application.
    If I do not do this process, I would get the “Session expired” Error. Permanently, no escape.

    So, I tried to any combination of just restart TOMCAT, restart Browser, deploy on a shutdown TOMCAT and so forth. The only thing that helps, is getting out of MyEclipse.

    I thought, when I stop TOMCAT, all sessions are closed and I would start a new session afterwards. But that is obviously that is not the case. My feeling is that there is a thread still living, when TOMCAT is stopped and only killed when the JRE is stoped too. That would imply a design-fault in IECfaces.

    Anyhow, I cannot solve that prob. Some gurus of MyEclipse should check that. The first step would be to check, if you can reproduce my problem.

    I hope, I was precise enough. If not, just ask me.

    Thanks
    Klaus

    #280530 Reply

    Riyad Kalla
    Member

    Klaus, this is *very* strange indeed. Can you export your project using File > Export > Archive, to a ZIP file for me. Then email it to support@genuitec.com ATTN Riyad and tell me exactly how to reproduce the problem? I’ll do some testing on my end.

    #280532 Reply

    kkaal
    Member

    Hi Riyad, thank you for your reply.

    I don’t need to send you my program. Just do the following (it’s reproducible on 2 of my machines):

    1) Install ICEfaces TutorialExample from “Examples-on-Demand” (which is a VERY good feature)
    2) Start Derby Database
    3) Click on project with right mouse and Debug as MyEclipse ServerApplication
    4) Click on “Click here”
    5) Do a few clicks on the page (table)
    6) NOW you redeploy, I do it this way:
    7) Click on Button “Deploy MyEclipse J2EE Project to server..”
    8) Select projekct and Server and click on Button “Redeploy”
    9) In the browsertab, you navigate to the first page of the project: “http://localhost:8080/ICEfacesTutorialExample/”
    10) Click on “Click here” link
    —— and then it throws the “Session expired” exception.

    From point 9) on you can proceed however you want, I allways get the exception, except, I exit MyEclipse, start it and the servers and call the pages.

    I have the latest Version of MyEclipse updated.

    Can you reproduce this?

    Klaus

    #280535 Reply

    Riyad Kalla
    Member

    Ahhh, you don’t even have to reload the page to see the error… just redeploy and watch your server console, Tomcat tries to deallocate the ICEfaces app and reload it, but it cannot, and eventually tries to unload the app and fails.

    This is definately an ICE-faces issue, but the good news is that as long as you are deploying your app exploded ( which Run As or Debug As does automatically) every change you make is deployed after you save the file, you don’t need to open up the deployment dialog and do it manually.

    NOTE: Restarting Tomcat did correct the issue for me. After I stopped the server, I just did a Debug As again and it worked fine as before. I just don’t think you can hotsync an entire ICE Faces app right now, so don’t try and force the reload which using Redeploy will, or you’ll have to restart Tomcat.

    #280537 Reply

    kkaal
    Member

    🙂 Thank you Riyad, I checked it as you suggested. Clever – a automated deployment. Although, when I get the “Session expired” issue, I really have to restart MyEclipse. That is doublechecked as well. But never mind. As long as I can work – who cares?

    But another question: I would like to work with the new libraries of ICEfaces. Where do I have to put them, that a project drags the latest version automatically?

    Thanks
    Klaus

    #280548 Reply

    Riyad Kalla
    Member

    But another question: I would like to work with the new libraries of ICEfaces. Where do I have to put them, that a project drags the latest version automatically?

    You can go to Window > Prefs > MyEclipse > Project Capabilities and redefine the contents of the ICEfaces library containers there, that way any project using the “ICEfaces” libraries from MyEclipse, will actually use the updated JARs you specify for them.

    I’m glad it’s working better now, and I believe you about restarting MyEclipse… I just have no idea why that is 🙂

    #284696 Reply

    XuYan
    Member

    I met the same problem, I just close the web brower and start it again, there would be no problem. I think it is because when you redeploy you appilication to Tomcat, tomcat would close all sessions. but the browser kept an old session if you didn’t restart it.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Session expires after deployment

You must be logged in to post in the forum log in