voyent
ICEFaces 2.0 and Liferay 6.0 Session Timeout  XML
Forum Index -> Portals & Portlets Go to Page: 1, 2 Next 
Author Message
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello All;
I am developing icefaces portlets on liferay portal and it works fine, but after a few clicks the session is timeout and I had to refresh.
I extended the time of session in both web.xml and Liferay configurations but it is no use.
My system specifications are:
1- Liferay 6.0.
2- Icefaces 2.0.
3- Glassfish 3.0.
4- EJB 3.0.
5- JSF 2.0.

Any help is more than appreciated.
Thank You in Advance.
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Can you simply your application to remove the EJB requirement and then try running it on Liferay + Tomcat. Just try to remove Glassfish as a possible factor.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Thank you for answering but my whole application depends on EJB module event the interfaces specifications>
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Ok, but we'll need more information to help troubleshoot the problem.

Is there anything in the logs on the server or perhaps in the browser console (e.g. Firebug in Firefox) that might provide a clue?

When you say "after a few clicks" can you be more specific about the steps that lead to the issue? Is the same number of interactions, the same order, a certain button that leads to the problem?

Can you provide the simplest .ear file that can be deployed to Glassfish that shows the issue in question?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Thank you for answering:
While I am trying to follow your suggestions here is the exception that i found, may be it clarify more things here
org.icefaces.application.SessionExpiredException: Session has expired
at org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:103)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:113)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:228)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException 

Regards;
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


and that exception too:
t]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at org.icefaces.util.EnvUtils.isICEfacesView(EnvUtils.java:318)
at org.icefaces.impl.context.DOMPartialViewContext.getPartialResponseWriter(DOMPartialViewContext.java:99)
at org.icefaces.impl.context.DOMPartialViewContext.getPartialResponseWriter(DOMPartialViewContext.java:97)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:198)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:124)
at org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:113)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:228)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662) 

Thank You
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Couple of things:

Can you be more specific about the exact version of ICEfaces you are using? It looks like it might be 2.0.0. The latest release on that track is 2.0.2 so perhaps upgrading might solve some problems.

You mention that you are using Liferay but the stack traces don't show any indication that the portal container (Liferay) or the PortletFaces Bridge are handling any of the requests. Are you running your application as a portlet or is it just a normal web application?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello;
we are using ICEFaces as a web application, the ICEFaces bridge is not used. we simply use iframe portlet and icefaces is version 2.0.0
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Can you confirm the exact version of JSF and Glassfish that is being used with ICEfaces 2.0.0? Many bugs have been fixed between 2.0.0 and 2.0.2 so upgrading is recommended. The version of JSF used is also important.

To continue debugging, we'll probably need a few more details about the environment then because it's not entirely clear how you have this set up.

If I understand the setup correctly, you are using Liferay and have a portal page and one of the portlets on the page is an iframe portlet:

http://www.liferay.com/community/wiki/-/wiki/Main/Iframe+Portlet

The content of this iframe portlet is from an ICEfaces application so it's not a actually a portlet itself.

Assuming this is the correct understanding, then analyzing the stack traces, I have the following comments/questions.

The first exception likely isn't an actual session expiry. JSF doesn't actually detect session expiry on it's own. It does detect problems with ViewExpiredExceptions. That is, if a request contains information about ViewState and that ViewState can't be found during the RestoreView phase, then ICEfaces tries to examine the ViewExpiredException and see if they might have been caused by the session expiring. If so, it wraps it as a SessionExpiredException to try and make the cause of the problem clearer.

The second exception is likely because there is no valid UIViewRoot and happens because of the first exception.

So we need to debug why the ViewExpiredException is happening and the best way to start on that is to look at the javax.faces.ViewState value that is being sent with each request. You can use the console of your browser or Firebug or any other HTTP sniffing tool to do that. There should be a javax.faces.ViewState sent with each submission once a valid View and Session have been established during the initial page load.

Another thing to try is to run the web application in a page by itself (rather than through the iframe portlet). Do you see the same behaviour?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello deryk;
I can not thank you enough for your advice, we will upgrade ICEfaces to version 2.0.2 and test again before returning to you again hoping with the problem resolved.
Thank You;
Best Regards;
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello deryk;
Thank you a lot for your advice, It is working now after we upgraded to ICEFaces 2.02. You were a great help.
Thank You again.
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


No problem. Glad things got worked out.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello deryk;
I am sorry to bother you again, but after updating a new type of session time out appeared. It displays message in the attached image then it reloads again with itself, any idea?
Thank You[img]
[Thumb - error.jpg]
 Filename error.jpg [Disk] Download
 Description
 Filesize 76 Kbytes
 Downloaded:  253 time(s)

deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


That message typically relates the Ajax Push connection. Are you using Ajax Push in your application?

Is there anything in the server logs to indicate a problem?

If you use one of the browser client dev consoles (like FireBug), are there any other errors reported?

We'll need more information to be able to diagnose the problem.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
Mohammed_FCIS

Joined: 19/Oct/2009 00:00:00
Messages: 20
Offline


Hello deryk;
Yes I am using Ajax push n my application.
No, there is no log in the server indicates the problem, and no error appeared in Firefox firebug plug-in, but I think it is a client side issue, as the server log remain the same with the last server hit even when I click reconnect on the message box.
 
Forum Index -> Portals & Portlets Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team