You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Schaal, Roland" <R....@Verband.Creditreform.de> on 2006/06/30 12:07:50 UTC
WG: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Maybe this thread is better placed here
________________________________
Von: Schaal, Roland
Gesendet: Freitag, 30. Juni 2006 10:52
An: MyFaces Discussion
Betreff: AW: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Hello,
As I reinvestigated into this problem, I might found the problem in the method JspStateManagerImpl$SerializedViewCollection.add(FacesContext, Object):
public synchronized void add(FacesContext context, Object state)
{
Object key = new SerializedViewKey(context);
_serializedViews.put(key, state);
_keys.add(key);
int views = getNumberOfViewsInSession(context);
while (_keys.size() > views)
{
key = _keys.remove(0);
getOldSerializedViewsMap().put(key, _serializedViews.remove(key));
}
}
Here the serializedView will be saved. If the number of added views exceed the NUMBER_OF_VIEWS_IN_SESSION_PARAM, the first view get´s removed from the arrayList _keys and from the hashMap _serializedViews and will be put in the getOldSerializedViewsMap().
This method will be called twice; once from facelet (ExtendedFaceletViewHandler.renderView) and once from DummyFormUtils.writeDummyForm()
So accessing one page causes two entries in _keys and one entry in _serializedViews
Also the while-part will be called twice, which means that the second call return null in _serializedViews.remove(key), so a null-value will be tried to put inside the getOldSerializedViewsMap()...
Can somebody comprehend this behavior?
Could the following be correct hack around this?
while (_keys.size() > views)
{
key = _keys.remove(0);
Object removedView = _serializedViews.remove(key);
if( removedView != null )
{
getOldSerializedViewsMap().put(key, removedView);
}
}
But maybe the mistake is, that this method is called twice...?!
Cheers,
Roland
________________________________
Von: Schaal, Roland
Gesendet: Freitag, 30. Juni 2006 08:14
An: MyFaces Discussion
Betreff: AW: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Hello,
I encounter the same problem in my app.
Does anybody know what is going on?
Thanks,
Roland
________________________________
Von: Harald Mueller [mailto:harald.mue@gmail.com]
Gesendet: Donnerstag, 29. Juni 2006 17:25
An: users@myfaces.apache.org
Betreff: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Hi!
I have some problems upgrading from 1.1.3-SNAPSHOT-libraries to the latest stable 1.1.3!
Log:
17:08:25,804 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
java.lang.NullPointerException : null values not allowed
at org.apache.commons.collections.map.AbstractReferenceMap.put(AbstractReferenceMap.java:251)
at org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection.add (JspStateManagerImpl.java:717)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView (JspStateManagerImpl.java:332)
at org.apache.myfaces.renderkit.html.util.DummyFormUtils.writeDummyForm(DummyFormUtils.java:153)
at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd (ExtensionsPhaseListener.java:112)
at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:96)
at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.renderCodeBeforeBodyEnd (ExtensionsPhaseListener.java:86)
at org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:66)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter (PhaseListenerManager.java:89)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java :144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at net.wimaxxed.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at net.wimaxxed.jbpm.webapp.filter.CharsetFilter.doFilter (CharsetFilter.java:25)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java :159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
17:08:25,806 DEBUG [FacesServlet] service end
Everything was working fine with the old libraries - I've just made some changes in my faces-config.xml like mentioned here:
http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3
What could be wrong here?
Thanks for helping.
regards
H
Re: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Posted by Mario Ivankovits <ma...@ops.co.at>.
Matthias Wessendorf schrieb:
> can you bring that to JIRA ?
I think there is no need to bring this to jira as I already fixed this
with the commit 398003 from 28.4.2006.
Anyway Roland, good catch, though, why didnt you tried the latest source?
Sorry for the inconvenience.
Ciao,
Mario
Re: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
Posted by Matthias Wessendorf <ma...@apache.org>.
can you bring that to JIRA ?
On 6/30/06, Schaal, Roland <R....@verband.creditreform.de> wrote:
>
>
> Maybe this thread is better placed here
>
> ________________________________
> Von: Schaal, Roland
> Gesendet: Freitag, 30. Juni 2006 10:52
>
> An: MyFaces Discussion
> Betreff: AW: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
>
>
>
> Hello,
>
> As I reinvestigated into this problem, I might found the problem in the
> method
> JspStateManagerImpl$SerializedViewCollection.add(FacesContext,
> Object):
> public synchronized void add(FacesContext context, Object state)
> {
> Object key = new SerializedViewKey(context);
> _serializedViews.put(key, state);
> _keys.add(key);
>
> int views = getNumberOfViewsInSession(context);
> while (_keys.size() > views)
> {
> key = _keys.remove(0);
> getOldSerializedViewsMap().put(key,
> _serializedViews.remove(key));
> }
> }
>
> Here the serializedView will be saved. If the number of added views exceed
> the NUMBER_OF_VIEWS_IN_SESSION_PARAM, the first view get´s
> removed from the arrayList _keys and from the hashMap _serializedViews and
> will be put in the getOldSerializedViewsMap().
>
> This method will be called twice; once from facelet
> (ExtendedFaceletViewHandler.renderView) and once from
> DummyFormUtils.writeDummyForm()
>
> So accessing one page causes two entries in _keys and one entry in
> _serializedViews
>
> Also the while-part will be called twice, which means that the second call
> return null in _serializedViews.remove(key), so a null-value will be tried
> to put inside the getOldSerializedViewsMap()...
>
> Can somebody comprehend this behavior?
>
> Could the following be correct hack around this?
>
> while (_keys.size() > views)
> {
> key = _keys.remove(0);
> Object removedView = _serializedViews.remove(key);
> if( removedView != null )
> {
> getOldSerializedViewsMap().put(key, removedView);
> }
> }
>
> But maybe the mistake is, that this method is called twice...?!
>
> Cheers,
> Roland
>
> ________________________________
> Von: Schaal, Roland
> Gesendet: Freitag, 30. Juni 2006 08:14
> An: MyFaces Discussion
> Betreff: AW: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
>
>
>
> Hello,
>
> I encounter the same problem in my app.
>
> Does anybody know what is going on?
>
> Thanks,
> Roland
>
> ________________________________
> Von: Harald Mueller [mailto:harald.mue@gmail.com]
> Gesendet: Donnerstag, 29. Juni 2006 17:25
> An: users@myfaces.apache.org
> Betreff: Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
>
>
> Hi!
>
> I have some problems upgrading from 1.1.3-SNAPSHOT-libraries to the latest
> stable 1.1.3!
>
> Log:
>
> 17:08:25,804 ERROR [PhaseListenerManager] Exception in PhaseListener
> RENDER_RESPONSE(6) afterPhase
> java.lang.NullPointerException : null values not allowed
> at
> org.apache.commons.collections.map.AbstractReferenceMap.put(AbstractReferenceMap.java:251)
> at
> org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection.add
> (JspStateManagerImpl.java:717)
> at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)
> at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView
> (JspStateManagerImpl.java:332)
> at
> org.apache.myfaces.renderkit.html.util.DummyFormUtils.writeDummyForm(DummyFormUtils.java:153)
> at
> org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.writeCodeBeforeBodyEnd
> (ExtensionsPhaseListener.java:112)
> at
> org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.getCodeBeforeBodyEnd(ExtensionsPhaseListener.java:96)
> at
> org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.renderCodeBeforeBodyEnd
> (ExtensionsPhaseListener.java:86)
> at
> org.apache.myfaces.renderkit.html.util.ExtensionsPhaseListener.afterPhase(ExtensionsPhaseListener.java:66)
> at
> org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter
> (PhaseListenerManager.java:89)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java
> :144)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> net.wimaxxed.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:35)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> net.wimaxxed.jbpm.webapp.filter.CharsetFilter.doFilter
> (CharsetFilter.java:25)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
> :173)
> at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:178)
> at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
> at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java
> :159)
> at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
> at java.lang.Thread.run(Thread.java:595)
> 17:08:25,806 DEBUG [FacesServlet] service end
>
> Everything was working fine with the old libraries - I've just made some
> changes in my faces-config.xml like mentioned here:
> http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3
>
> What could be wrong here?
>
> Thanks for helping.
>
> regards
> H
>
>
--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com