2 Replies Latest reply on Jun 8, 2007 1:30 AM by Gavin King

    NPE in seam 1.3 PDF with image

    mgrouch Expert

      <p:image resource="/logo.jpg" />


      java.lang.NullPointerException
      at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
      at com.lowagie.text.Image.getInstance(Image.java:460)
      at org.jboss.seam.pdf.ui.UIImage.createITextObject(UIImage.java:140)
      at org.jboss.seam.pdf.ui.ITextComponent.encodeBegin(ITextComponent.java:180)
      at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:243)
      at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:212)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
      at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
      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)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)


      Line in iText
      is = new java.io.ByteArrayInputStream(imgb);

      so imdb passed as null from seam
      org.jboss.seam.pdf.ui.UIImage.createITextObject(UIImage.java:140)

      This looks like a Seam bug