10 Replies Latest reply on Jul 16, 2009 3:36 AM by - -

    Experiencing problems with RichFaces / Dependency Injection

    - - Newbie

      Hi.

      I am experiencing trouble with Richfaces and the strange thing is, it has worked some days ago :( Dont know what I could have changed. I am using dependency injection in my managed bean (jsf module) , which is deployed inside an EAR file with a EJB3 module. Some methods work because the dependency injection did its job. Others dont because the session bean is null. It seems to be connected with AJAX / RichFaces. I am trying to change one drop down which leads to changing the list of the next dropdown list too.

      javax.servlet.ServletException: java.lang.NullPointerException
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      javax.faces.FacesException: java.lang.NullPointerException
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:714)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:224)
       org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
       com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
       com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      java.lang.NullPointerException
       de.me.myproduct.web.managedbeans.MyManagedBean.findCountryByName(MyManagedBean.java:170)
       de.me.myproduct.web.converter.CountryConverter.getAsObject(CountryConverter.java:28)
       com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:167)
       com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:188)
       com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:301)
       javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
       javax.faces.component.UIInput.validate(UIInput.java:868)
       javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
       javax.faces.component.UIInput.processValidators(UIInput.java:672)
       javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
       org.ajax4jsf.component.UIAjaxRegion.processValidators(UIAjaxRegion.java:121)
       org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
       org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44)
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
       javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
       org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:224)
       org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
       com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
       com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)