1 Reply Latest reply on Mar 25, 2009 9:21 AM by Ilya Shaikovsky

    Strange EL exception at a4j mediaOutput

    Matjaz Muhic Newbie

      Here's the JSP code:

      <rich:modalPanel id="panel" width="800" height="450">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="#{customChartBean.p_description}"></h:outputText>
       </h:panelGroup>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="resources/close.png" styleClass="hidelink" id="hidelink"/>
       <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
       <h:form id="modalPanel1Form">
       <h:panelGrid columns="2" columnClasses="topAlign">
       <h:panelGrid columns="1" columnClasses="topAlign">
       <rich:spacer height="15"/>
       <h:outputText value="History" />
       <rich:dataList value="#{customChartBean.availableDates}" var="d" style="position: relative; left: -28px">
       <a4j:commandLink reRender="panel" actionListener="#{customChartBean.paramListener}" onclick="Richfaces.showModalPanel('loadingPanel');Richfaces.hideModalPanel('panel')" oncomplete="Richfaces.hideModalPanel('loadingPanel');Richfaces.showModalPanel('panel')">
       <h:outputText value="#{d.date}"/>
       <f:attribute name="chartDateFrom" value="#{d.dateFromInMilis}"/>
       <f:attribute name="chartDateTo" value="#{d.dateToInMilis}"/>
       </a4j:commandLink>
       <br/>
       </rich:dataList>
       </h:panelGrid>
       <a4j:mediaOutput id="chart1" element="img" cacheable="false" createContent="#{customChartBean.makeChart}" mimeType="image/png" >
       <f:param name="time" value="#{customChartBean.timestamp}"/>
       </a4j:mediaOutput>
       </h:panelGrid>
       </h:form>
       </rich:modalPanel>
      


      This is the line of the exception:
      <a4j:mediaOutput id="chart1" element="img" cacheable="false" createContent="#{customChartBean.makeChart}" mimeType="image/png">


      And the exception is:

      javax.el.ELException: javax.faces.el.EvaluationException: org.apache.jasper.el.JspELException: /monitor.jsp(478,20) '#{customChartBean.makeChart}' java.lang.IllegalArgumentException: Null 'key' argume
      nt.
      at org.richfaces.webapp.taglib.MethodExpressionMethodBindingAdaptor.invoke(MethodExpressionMethodBindingAdaptor.java:87)
      at org.ajax4jsf.resource.UserResource.send(UserResource.java:115)
      at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
      at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:146)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:225)
      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:486)
      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:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      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:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.faces.el.EvaluationException: org.apache.jasper.el.JspELException: /monitor.jsp(478,20) '#{customChartBean.makeChart}' java.lang.IllegalArgumentException: Null 'key' argument.
      at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:56)
      at org.richfaces.webapp.taglib.MethodExpressionMethodBindingAdaptor.invoke(MethodExpressionMethodBindingAdaptor.java:83)
      ... 26 more
      Caused by: org.apache.jasper.el.JspELException: /monitor.jsp(478,20) '#{customChartBean.makeChart}' java.lang.IllegalArgumentException: Null 'key' argument.
      at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:77)
      at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:52)
      ... 27 more
      Caused by: java.lang.IllegalArgumentException: Null 'key' argument.
      at org.jfree.data.general.Series.<init>(Series.java:112)
      at org.jfree.data.general.Series.<init>(Series.java:101)
      at org.jfree.data.time.TimeSeries.<init>(TimeSeries.java:171)
      at org.jfree.data.time.TimeSeries.<init>(TimeSeries.java:152)
      at org.my.richfaces.CustomChartBean.getDataSet(CustomChartBean.java:111)
      at org.my.richfaces.CustomChartBean.createDataset(CustomChartBean.java:103)
      at org.my.richfaces.CustomChartBean.makeChart(CustomChartBean.java:67)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.el.parser.AstValue.invoke(AstValue.java:170)
      at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
      ... 28 more


        • 1. Re: Strange EL exception at a4j mediaOutput
          Ilya Shaikovsky Master

          checked with Rf sample on JSP and works.
          seems you should debug your code according to


          Caused by: java.lang.IllegalArgumentException: Null 'key' argument.
          at org.jfree.data.general.Series.(Series.java:112)
          at org.jfree.data.general.Series.(Series.java:101)
          at org.jfree.data.time.TimeSeries.(TimeSeries.java:171)
          at org.jfree.data.time.TimeSeries.(TimeSeries.java:152)
          at org.my.richfaces.CustomChartBean.getDataSet(CustomChartBean.java:111)
          at org.my.richfaces.CustomChartBean.createDataset(CustomChartBean.java:103)
          at org.my.richfaces.CustomChartBean.makeChart(CustomChartBean.java:67)