[richfaces-issues] [JBoss JIRA] (RF-12693) a4j:commandButton causes NullPointerException in PartialViewContextImpl for IE7 requests if a <button> is present

Justin Rosenberg (JIRA) jira-events at lists.jboss.org
Fri Jan 4 11:41:08 EST 2013


    [ https://issues.jboss.org/browse/RF-12693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743586#comment-12743586 ] 

Justin Rosenberg edited comment on RF-12693 at 1/4/13 11:40 AM:
----------------------------------------------------------------

@Pavol,

  Taking your example, I added a servlet filter.  I think I see what is wrong.

{code}
10:34:17,724 INFO  [stdout] example=example&=button&javax.faces.ViewState=-2621112732722648039%3A-4544027983878449135&javax.faces.source=example%3Aj_idt5&javax.faces.partial.event=click&javax.faces.partial.execute=example%3Aj_idt5%20example%3Aj_idt5&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
{code}

Specifically notice the "&=button" which I don't believe is correct syntax.  If I add name="foo" on the button the post looks better.

{code}
10:36:36,074 INFO  [stdout] example=example&foo=button&javax.faces.ViewState=8332388767031820036%3A3512517802181868303&javax.faces.source=example%3Aj_idt5&javax.faces.partial.event=click&javax.faces.partial.execute=example%3Aj_idt5%20example%3Aj_idt5&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
{code}

Since your example does not have any RichFaces tags I will update the Majarra JIRA (http://java.net/jira/browse/JAVASERVERFACES-2666).  Thanks for your help.
                
      was (Author: JustinKSU):
    @Pavol,

  Taking your example, I added a servlet filter.  I think I see what is wrong.

{code}
10:34:17,724 INFO  [stdout] example=example&=button&javax.faces.ViewState=-2621112732722648039%3A-4544027983878449135&javax.faces.source=example%3Aj_idt5&javax.faces.partial.event=click&javax.faces.partial.execute=example%3Aj_idt5%20example%3Aj_idt5&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
{code}

Specifically notice the "&=button" which I don't believe is correct syntax.  If I add name="foo" on the button the post looks better.

{code}
10:36:36,074 INFO  [stdout] example=example&foo=button&javax.faces.ViewState=8332388767031820036%3A3512517802181868303&javax.faces.source=example%3Aj_idt5&javax.faces.partial.event=click&javax.faces.partial.execute=example%3Aj_idt5%20example%3Aj_idt5&javax.faces.behavior.event=action&javax.faces.partial.ajax=true
{code}

Since your example does not have any RichFaces tags I will update the Majara JIRA (http://java.net/jira/browse/JAVASERVERFACES-2666).  Thanks for your help.
                  
> a4j:commandButton causes NullPointerException in PartialViewContextImpl for IE7 requests if a <button> is present
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-12693
>                 URL: https://issues.jboss.org/browse/RF-12693
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 4.3.0.M3
>         Environment: JBoss 7.1.1 with the stock "jsf-impl-2.1.7-jbossorg-2.jar" or upgraded to "jsf-impl-2.1.15.jar"
>            Reporter: Justin Rosenberg
>
> When using the Richfaces a4j:commandButton I get the following stack trace when using Internet Explorer 7. This problem does not occur in IE8+ or Chrome.
> {code}
> 15:19:57,630 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.lang.NullPointerException
> at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:441) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:71) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:582) [jsf-impl-2.1.15.jar:2.1.15]
> at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115) [jsf-api-2.1.15.jar:2.1]
> at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:124) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.15.jar:2.1.15]
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.15.jar:2.1.15]
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jsf-api-2.1.15.jar:2.1]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
> at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_20]
> {code}
> I was surprised that this was only an IE7 issue, but I did find that PrimeFaces ran into a similar problem (http://code.google.com/p/primefaces/issues/detail?id=4361).
> Is there a workaround for this? Is this a Mojarra, RichFaces, or JBoss issue?
> I created http://java.net/jira/browse/JAVASERVERFACES-2666 in case this is a Mojarra problem, maybe we could help them resolve the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list