Bug 905165 - Method expression parameters causes NPE/MethodNotFoundException
Summary: Method expression parameters causes NPE/MethodNotFoundException
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER3
: EAP 6.1.0
Assignee: Rémy Maucherat
QA Contact: Marek Schmidt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-28 18:09 UTC by Marek Schmidt
Modified: 2014-05-27 01:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An Expression Language (EL) method in a JSF page with any arguments set to the value of `null` cause an exception (NullPointerException) to be thrown when invoked. This occurred because the JBoss Web EL parser did not handle the case of an argument being a null value. JBoss Web has been updated to properly handle null values in method expressions. Invoking an EL methods with a null parameter now performs as expected.
Clone Of: 902421
Environment:
Last Closed: 2013-07-18 13:38:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 902421 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 902421

Description Marek Schmidt 2013-01-28 18:09:14 UTC
+++ This bug was initially created as a clone of Bug #902421 +++
clone of a 6.0.1 one-off, targeting the next EAP6 release. 

See https://bugzilla.redhat.com/show_bug.cgi?id=902421 for the reproducer.

Description of problem:

In index.xhtml file:

<h:commandButton
  value="call with null arg gives NullPointerException"
  action="#{nullTestBean.testAction(nullTestBean.nullValue)}"
/>

where nullTestBean.getNullValue() method returns null,
causes NullPointerException in server.log:

 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jbossNullBug].[jsf]] (http-/0.0.0.0:60000-7) Servlet.service() for servlet jsf threw exception: java.lang.NullPointerException
	at java.lang.Class.isAssignableFrom(Native Method) [rt.jar:1.7.0_01]
	at org.apache.el.util.ReflectionUtil.isAssignableFrom(ReflectionUtil.java:319) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:185) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.el.parser.AstValue.invoke(AstValue.java:257) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
	at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-redhat-1.jar:2.1.7-redhat-1]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.2.Final-redhat-1.jar:2.0.2.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]

Comment 1 Aaron Ogburn 2013-01-28 22:47:06 UTC
EAP 6.1 is upgrading to JBossWeb 7.2; the fix is already upstream in the 7.2 branch, so retagging JBossWeb and using that in EAP 6.1 will get this fix in.

Comment 2 baranowb 2013-03-13 10:04:17 UTC
Why status is not "MODIFIED" or something different than "NEW", given the fix is already in upstream artifact ?

Comment 3 Rémy Maucherat 2013-03-13 10:06:02 UTC
Ok, it should be modified since it is in progress.

Comment 4 baranowb 2013-03-14 07:22:02 UTC
Yup, otherwise it pops up in BZ search for "workable" issues :)

Comment 6 Marek Schmidt 2013-03-29 15:15:27 UTC
Verified on EAP 6.1.0.ER3


Note You need to log in before you can comment on or make changes to this bug.