6 Replies Latest reply on Oct 13, 2009 2:05 PM by maru sc

    Unable to generate PDF using seam-gen project

    maru sc Newbie

      Hi all,
      please send me the steps to generate PDF using seam-gen project

        • 1. Re: Unable to generate PDF using seam-gen project
          xsa lefter Newbie

          Have you try the itext in seam examples distribution?

          • 2. Re: Unable to generate PDF using seam-gen project
            maru sc Newbie

            Hi all,
            I tried itext in seam examples it works fine but for me throws following exception


            Exception during request processing: Caused by javax.servlet.ServletException with message: java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: javax.faces.FacesException: Cant instantiate class: org.jboss.seam.pdf.ui.UIDocument.


            com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Unknown Source)





            Please send me the directory structure to place library files because WEB-INF/lib is not present in seam-gen project
             

            • 3. Re: Unable to generate PDF using seam-gen project
              xsa lefter Newbie

              Which version of seam do you used? Have you jboss-seam-pdf.jar in your lib?

              • 4. Re: Unable to generate PDF using seam-gen project
                maru sc Newbie

                Hi good morning,


                I used seam 2.1.2 version and jboss-seam-pdf.jar is there in the lib folder.


                Please send me the directory structure to place library in seam-gen project

                • 5. Re: Unable to generate PDF using seam-gen project
                  xsa lefter Newbie

                  You need an itext.jar and itext-rtf.jar in your war or deployed application. Also dont forget to add a


                  xmlns:ui="http://jboss.com/products/seam/ui


                  and


                  http://jboss.com/products/seam/ui http://jboss.com/products/seam/ui-2.2.xsd


                  in your components.xml definition.

                  • 6. Re: Unable to generate PDF using seam-gen project
                    maru sc Newbie

                    HI xsa lefter


                    I follow the same steps thst you told but unable to get pdf. Any xml configuration is needed to web.xml?
                    . please send simple code to generate pdf
                    . directory structure of seam-gen project to place library files



                    it throws following exception


                    Exception during request processing:



                    Caused by javax.servlet.ServletException with message: java.lang.Exception: javax.faces.FacesException:

                    Problem in renderResponse: null



                    com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179)
                    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                    org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                    org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                    org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                    org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                    org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                    java.lang.Thread.run(Unknown Source)