5 Replies Latest reply on Feb 10, 2009 10:10 AM by Bright Dadson

    a4j exception

    Bright Dadson Newbie

      Hi Experts,

      I am using below a4j:region;

      <a4j:region selfRendered="true" ajaxListener="#{yourbean.a4jMethod}" id="text">
       <h:selectOneMenu id="symbol" value="#{user.name}" >
       <f:selectItem id="b" itemLabel="Symbol" itemValue="symbol" />
       <f:selectItem id="a" itemLabel="Code" itemValue="code" />
       <a4j:support reRender="re2" actionListener="#{yourBean.a4jMethod}" event="onchange"/>
       </h:selectOneMenu>
      </a4j:region>
      <h:outputText id = "re2" value="#{user.name}"/>
      


      And an AjaxEvent method like;

      processRoom(AjaxEvent arg0){
       ...
      }


      The problem is, eventhough the application woorks as expected, i still this exception logged to my glassfish v2 log anytime the AjaxEvent is called.

      Do anyone know how to stop this exception?

      |SEVERE|sun-appserver9.1|javax.faces.event|_ThreadID=14;_ThreadName=httpSSLWorkerThread-80-4;_RequestID=e3de9fda-4246-4c31-9b40-fe7da9d6467a;|javax.el.MethodNotFoundException: Method not found: com.mvc.model.Service@1daa766.Pricing(javax.faces.event.ActionEvent)
      at com.sun.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:154)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:184)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
      at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
      at javax.faces.component.UICommand.broadcast(UICommand.java:368)
      at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at net.listener.webapp.eFilter.doFilter(eFilter.java:87)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
      at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
      at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
      at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
      at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
      at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
      at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
      at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
      at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
      |#]


        • 1. Re: a4j exception
          Ilya Shaikovsky Master

          should be simple ActionEvent not AjaxEvent.

          • 2. Re: a4j exception
            Bright Dadson Newbie

            I did change the method to this;

            public void processRoom(ActionEvent arg0) throws javax.faces.event.AbortProcessingException {
            ...
            }


            And got below exception

            Timestamp

            Feb 9, 2009 12:53:05.638
            Log Level

            SEVERE
            Logger

            org.ajax4jsf.webapp.BaseXMLFilter
            Name-Value Pairs

            _ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-2;_RequestID=a17af3e0-224a-417e-96ad-883641302f94;
            Record Number

            2060
            Message ID

            Exception in the filter chain javax.servlet.ServletException
            Complete Message

            Method not found: com.easy.xml.lis.XMLApp@192302d.processRoom(org.ajax4jsf.event.AjaxEvent) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: javax.el.MethodNotFoundException: Method not found: com.easy.xml.lis.XMLApp@192302d.processRoom(org.ajax4jsf.event.AjaxEvent) at com.sun.el.util.ReflectionUtil.getMethod(ReflectionUtil.java:154) at com.sun.el.parser.AstValue.invoke(AstValue.java:184) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.ajax4jsf.component.AjaxRegionBrige.broadcast(AjaxRegionBrige.java:230) at org.ajax4jsf.component.UIAjaxRegion.broadcast(UIAjaxRegion.java:152) at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317) at org.ajax4jsf.component.AjaxViewRoot.broadcastAjaxEvents(AjaxViewRoot.java:336) at org.ajax4jsf.application.AjaxViewHandler.processAjaxEvents(AjaxViewHandler.java:206) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:182) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) ... 34 more

            • 3. Re: a4j exception
              Bright Dadson Newbie

              This time the application doesn't with the exception shown above.

              • 4. Re: a4j exception
                Ilya Shaikovsky Master

                please do not simplify the code in the parts which connected to the case itself. I've missed that you using ajaxListener within region and thinking about action listener on support.

                for actionListener you should use ActionEvent and for Ajax listener AjaxEvent. So you can't point both listeners to the same method.

                • 5. Re: a4j exception
                  Bright Dadson Newbie

                  Thanks very much for you expert advice, you absolutely right it did the job.