Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1702

<s:entityConverter> gives NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2.0.0.BETA1
    • Fix Version/s: 2.0.0.CR1
    • Component/s: Framework
    • Labels:
      None
    • Environment:

      XP, Cygwin, 4.2 Jboss, mysql 5.0 + driver

      Description

      Using <s:entityConverter> on my app I get a NPE:

      javax.servlet.ServletException
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
      org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      ROOT CAUSE:

      java.lang.NullPointerException
      org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:69)
      org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67)
      org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:123)
      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469)
      com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:502)
      com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:757)
      com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:811)
      com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
      org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:286)
      org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
      org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeChildren(AjaxContainerRenderer.java:100
      )
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      org.ajax4jsf.ajax.UIAjaxRegion.encodeChildren(UIAjaxRegion.java:117)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:244)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:175)
      org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
      org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:87)
      org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
      org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      I think I tracked it down to EntityConverter.java.
      The create() never gets invoked
      private ValueExpression<EntityManager> entityManager;
      private EntityConverterStore entityIdentifierStore;

      @Create
      public void create()

      { entityIdentifierStore = EntityConverterStore.instance(); }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pmuir Pete Muir
                  Reporter:
                  dhinojosa Daniel Hinojosa
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: