0 Replies Latest reply on May 9, 2012 6:24 AM by ensemien

    [jsf 2 , iText ] problem to generate pdf file

    ensemien

      Hello everyone 

      i am working my Graduation Project with jee technology (JSF 2 ,Spring,richfaces4) and i have to generate report (pdf file) ,

      i tried some solution like ireport but i am not satidfied ; i want to try iText with jsf ; i am reading this tutorial : http://docs.jboss.com/seam/1.1.6.GA/reference/en/html/itext.html

       

      but i have error to generate the pdf ;

      this is my facelet (testRich2.xhtml) :

       

      
      <p:document xmlns:p="http://jboss.com/products/seam/pdf"> 
      
          <p:font size="24">
              <p:paragraph spacingAfter="50">My First Document</p:paragraph>
          </p:font>
      
          <p:paragraph alignment="justify">
              This is a simple document.  It isn't very fancy.
          </p:paragraph>
      </p:document>
      
      
      

       

      and this is the error :

       

      Grave: "Servlet.service()" pour la servlet Faces Servlet a généré une exception
      java.lang.IllegalArgumentException: null source
          at java.util.EventObject.<init>(Unknown Source)
          at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)
          at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73)
          at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73)
          at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:271)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:257)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
          at java.lang.Thread.run(Unknown Source)
      
      
      
      

       

      in my  lib directory : there are : iText 2.1.7 .jar  ,     jboos-seam-pdf.2.1.2 .jar  and . jboos.seam.jar

       

      i need your help please .