0 Replies Latest reply on Jan 25, 2012 10:33 AM by Mustapha ouaser

    java.lang.NullPointerException when invoking action listener

    Mustapha ouaser Newbie

      The following error occurred after I have an EJB and WAR projects into EAR project deployed under JBoss AS7.1:

      I use: JSF 1.2 and RichFaces 3.3.3 like in my old system AS4.2.3 Jboss. The application seems to be under these circumstances, no Bean methods can be called from WebHandler over JSF-view. Even with the global lookup can not solve this problem. I ask for your help. Here is the (short) error message :

       

      Received 'java.lang.NullPointerException' when invoking action listener '#{xxxBean.doSearchByAunr}' for component 'j_id32'

      Fatal [javax.faces.event] (http-127.0.0.1-127.0.0.1-8080-3) java.lang.NullPointerException

      ...

      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:262)

          at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

          at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)

          at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)

          at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

      ....

      ...

      ERROR [org.ajax4jsf.component.AjaxViewRoot] (http-127.0.0.1-127.0.0.1-8080-3) Error processing faces event for the component j_id25:j_id32: javax.faces.event.AbortProcessingException:/firstview.jspx@35,34 actionListener="#{xxxBean.doSearchByAunr}": java.lang.NullPointerException

           at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:118) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]

          at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]

          at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:774) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]

          at javax.faces.component.UICommand.broadcast(UICommand.java:372) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]

      ...

      Caused by: java.lang.NullPointerException

          at com.xxx.xxxHandler.doSearchByAunr(xxxHandler.java:211) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_02]

          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_02]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_02]

      ...

          at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]

       

      thanks in advance

      Mustapha