Schedule lazy load ajax request fails in a portlet environme

UI Components for JSF
Post Reply
TomWolk
Posts: 1
Joined: 26 Aug 2010, 14:51

27 Aug 2010, 10:18

I want to use the scheduler component with the lazy load data model but I can not get it to work in a portlet environment. When I access the page directly the schedule events are loaded from the database and displayed in the browser ever time I change the month (or week). But when I open the portlet that displayes the exact same faces file the ajax requests fail. Rich Faces ajax requests work just fine.

I use
JBoss 4.2.3
JBoss Portlet Bridge 1.0.0.CR3 and 2.0.0.FINAL (have tried both)
Prime Faces 1.1
JBoss Seam 2.2.1.CR1

In the log there finds following exception:

Code: Select all

09:58:27,468 ERROR [lifecycle] JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@b49d4a]
09:58:27,468 ERROR [Exceptions] handled and logged exception
javax.servlet.ServletException: viewId:/views/index.xhtml - View /views/index.xhtml could not be restored.
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
	at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
	at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
	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:619)
Caused by: javax.faces.application.ViewExpiredException: viewId:/views/index.xhtml - View /views/index.xhtml could not be restored.
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
	... 43 more
09:58:27,515 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=null[severity=(INFO 0), summary=(viewId:/views/index.xhtml - View /views/index.xhtml could not be restored.), detail=(viewId:/views/index.xhtml - View /views/index.xhtml could not be restored.)]
The captured TCP stream looks like that:

Code: Select all

POST /intranet-webtop-Web/faces/views/index.xhtml?org.jboss.portletbridge.NAMESPACE=jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj HTTP/1.1

Host: 157.177.6.11:8180

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

Accept: application/json, text/javascript, */*

Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

X-Requested-With: XMLHttpRequest

Referer: http://157.177.6.11:8180/portal/portal/intranet/webtop

Content-Length: 1536

Cookie: JSESSIONID=0887F3BE2AC584527D880E5AE5E3F6EC

Pragma: no-cache

Cache-Control: no-cache



_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4=_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_datevonInputDate=27.08.2010+09%3A34&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_datevonInputCurrentDate=08%2F2010&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_datebisInputDate=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_datebisInputCurrentDate=08%2F2010&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_projekt=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Aj_id17_selection=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_taetigkeit=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_region_taetigkeit%3Aj_id28_selection=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_detailtaetigkeit=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_region_detailtaetigkeit%3Aj_id39_selection=&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj%3A_viewRoot%3Aj_id4%3Asc_beschreibung=&javax.faces.ViewState=j_id2&primefacesPartialSource=_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj:_viewRoot:j_id4:scheduler&primefacesPartialRequest=true&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj:_viewRoot:j_id4:scheduler_start=1280613600000&_jbpns_2fintranet_2fwebtop_2fcenterWindowsnpbj:_viewRoot:j_id4:scheduler_end=1284242400000HTTP/1.1 302 Moved Temporarily

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0

X-Powered-By: JSF/1.2

Location: http://157.177.6.11:8180/intranet-webtop-Web/faces/error.xhtml?cid=5

Content-Length: 0

Date: Fri, 27 Aug 2010 07:58:27 GMT



GET /intranet-webtop-Web/faces/error.xhtml?cid=5 HTTP/1.1

Host: 157.177.6.11:8180

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer: http://157.177.6.11:8180/portal/portal/intranet/webtop

Cookie: JSESSIONID=0887F3BE2AC584527D880E5AE5E3F6EC

Pragma: no-cache

Cache-Control: no-cache



HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0

X-Powered-By: JSF/1.2

Content-Type: text/html;charset=UTF-8

Content-Length: 427

Date: Fri, 27 Aug 2010 07:58:27 GMT



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Refresh" content="5; URL=uebersicht.seam" />
    </head>
    <body>
        <h1>
            Ihre session ist abgelaufen, Sie werden in 5 Sekunden weitergeleitet!
        </h1>
    </body>
</html>
While the correct TCP stream (when not using the portlet) looks like that:

Code: Select all

POST /intranet-webtop-Web/views/index.xhtml HTTP/1.1

Host: 157.177.6.11:8180

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

Accept: application/json, text/javascript, */*

Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Content-Type: application/x-www-form-urlencoded; charset=UTF-8

X-Requested-With: XMLHttpRequest

Referer: http://157.177.6.11:8180/intranet-webtop-Web/views/index.xhtml

Content-Length: 572

Cookie: JSESSIONID=0887F3BE2AC584527D880E5AE5E3F6EC

Pragma: no-cache

Cache-Control: no-cache



j_id4=j_id4&j_id4%3Asc_datevonInputDate=27.08.2010+09%3A56&j_id4%3Asc_datevonInputCurrentDate=08%2F2010&j_id4%3Asc_datebisInputDate=&j_id4%3Asc_datebisInputCurrentDate=08%2F2010&j_id4%3Asc_projekt=&j_id4%3Aj_id17_selection=&j_id4%3Asc_taetigkeit=&j_id4%3Asc_region_taetigkeit%3Aj_id28_selection=&j_id4%3Asc_detailtaetigkeit=&j_id4%3Asc_region_detailtaetigkeit%3Aj_id39_selection=&j_id4%3Asc_beschreibung=&javax.faces.ViewState=j_id1&primefacesPartialSource=j_id4:scheduler&primefacesPartialRequest=true&j_id4:scheduler_start=1280613600000&j_id4:scheduler_end=1284242400000HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0

X-Powered-By: JSF/1.2

Content-Type: application/json;charset=UTF-8

Content-Length: 1467

Date: Fri, 27 Aug 2010 07:56:15 GMT



{"events" : [{"id": "d882042d-7036-420f-a9fd-37d03aa237db","title": "||: Projektmeeting","start": 1282723200000,"end": 1282730400000,"allDay":false,"className":"arbeitszeit"},{"id": "7330b4fd-9fe2-4d1c-8b18-6efe57d7e668","title": "||: Treffen","start": 1282714620000,"end": 1282730400000,"allDay":false,"className":"arbeitszeit"},{"id": "9af9cc5b-d589-44a4-9c94-a9d00fa9c23e","title": "||: Treffen asdfjalsdjfl","start": 1282717440000,"end": 1282730400000,"allDay":false,"className":"arbeitszeit"},{"id": "6a035bc8-7d5d-4639-866c-c6c257492bca","title": "||: dfSDFADSFADFADFDSAFfefrsfddsfs","start": 1282741560000,"end": 1282816800000,"allDay":false,"className":"arbeitszeit"},{"id": "9e2e5279-3128-475f-814d-be9e451927cc","title": "||: SDFASDFADFFsdfdsf","start": 1282808520000,"end": 1282816800000,"allDay":false,"className":"arbeitszeit"},{"id": "a4043872-2e45-4ce1-89ba-8e395bc61e5a","title": "||: SDFASDFADFFsdfdsf","start": 1282808520000,"end": 1282816800000,"allDay":false,"className":"arbeitszeit"},{"id": "a6d0dd97-d921-442b-b6a4-30c1a2ec41d9","title": "||: ilzklkl","start": 1282808520000,"end": 1282903200000,"allDay":false,"className":"arbeitszeit"},{"id": "2aac52f4-fda5-4b0a-b977-ea5c95f6840c","title": "||: ","start": 1282891860000,"end": 1282903200000,"allDay":false,"className":"arbeitszeit"},{"id": "44e727f2-ae76-4d85-8b33-9c32af107b0f","title": "||: asfasfsdf","start": 1282891860000,"end": 1282903200000,"allDay":false,"className":"arbeitszeit"}]}POST /intranet-webtop-Web/views/index.xhtml HTTP/1.1

I would appreciate every help.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Aug 2010, 12:59

1.1 does not support portlets good enough, 2.2 does a better job at this.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 43 guests