0 Replies Latest reply on Jan 30, 2008 7:16 AM by Brian Bassil

    Cannot get itext to work using Eclipse seam development tool

    Brian Bassil Newbie

      I am attempting to use itext from the Seam development tools in eclipse. However I always get an exception when visiting the page. The following is the process I followed to create a simple web project.

      Using Eclipse 3.3.1 / JBoss-4.2.2.GA AS / JBoss Seam - 2.0.0.GA

      New Seam WEB Project using JBoss 4.2 Runtime, JBoss 4.2 Server and Dynamic Web Project with Seam 2.0 (technology preview)

      The database is MySQL 5 with MySQL JDBC Driver, but this isn't used.

      In the project I create a new XHTNL file with contents

      <p:document xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:p="http://jboss.com/products/seam/pdf">
      
      <p:paragraph>HELLO WORLD</p:paragraph>
      
      </p:document>


      I have Added jcommon.jar/itext.jar and jfreechart.jar to Web App Librarie (jboss-seam-pdf.jar already there), and checked they are exported.

      Added the following to web.xml

      <servlet>
       <servlet-name>Document Store Servlet</servlet-name>
       <servlet-class>org.jboss.seam.pdf.DocumentStoreServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Document Store Servlet</servlet-name>
       <url-pattern>*.pdf</url-pattern>
       </servlet-mapping>


      Console

      12:03:58,387 WARN [lifecycle] phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1782f03) threw exception: java.lang.NullPointerException null
      org.jboss.seam.pdf.DocumentStorePhaseListener.sendContent(DocumentStorePhaseListener.java:47)
      org.jboss.seam.pdf.DocumentStorePhaseListener.beforePhase(DocumentStorePhaseListener.java:37)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      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.MultipartFilter.doFilter(MultipartFilter.java:85)
      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:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      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:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      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:157)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      java.lang.Thread.run(Unknown Source)
      Run as -> Run on Server