3 Replies Latest reply on Aug 20, 2008 12:46 PM by Robert H

    Problem with seam-pdf

    Robert H Newbie

      I have created this document:



      <p:document xmlns:p="http://jboss.com/products/seam/pdf">
      <p:paragraph>
      This is a simple document.
      </p:paragraph>
      </p:document>



      When i navigate to that document I get the following error:


      14:13:55,505 ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: com/lowagie/text/xml/simpleparser/EntitiesToUnicode
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Unknown Source)
      14:13:55,505 ERROR [ExceptionFilter] exception root cause
      java.lang.NoClassDefFoundError: com/lowagie/text/xml/simpleparser/EntitiesToUnicode
           at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:190)
           at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:235)
           at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:200)
           at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
           at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
           at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: com.lowagie.text.xml.simpleparser.EntitiesToUnicode
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
           at java.lang.ClassLoader.loadClassInternal(Unknown Source)



      I'm running Seam 1.2.1.GA on Jboss 4.0.5.GA.


      Any ideas? Thanks




        • 1. Re: Problem with seam-pdf
          Robert H Newbie

          It seems that I used an old version of the iText jar. Replaced it with the one shipped with Seam 1.2.1 and problem solved.

          • 2. Re: Problem with seam-pdf
            Alexander Kunkel Newbie
            Hello Robert,

            I have not much experience with Seam and i work with Seam 2 and with seam-gen generated eclipse projects. A wrong hint from me will not make a lot damage :-).

            You need the iText library in your classpath.

            The generated build.xml contains a list of JARs which will packed into the EAR. Look for it in your build.xml and check if there is the iText library included.

            My list follows:

            <target name="ear" description="Build the EAR">
                    <copy todir="${ear.dir}">
                            <fileset dir="${basedir}/resources">
                                    <include name="*jpdl.xml" />
                                    <include name="*hibernate.cfg.xml" />
                                    <include name="jbpm.cfg.xml" />
                            </fileset>
                              <fileset dir="${lib.dir}">
                                        <include name="jboss-seam.jar" />
                              </fileset>
                            <fileset dir="${basedir}">
                                    <include name="lib/jbpm*.jar" />
                                    <include name="lib/jboss-el.jar" />
                                    <include name="lib/drools-*.jar"/>
                                    <include name="lib/core.jar"/>
                                    <include name="lib/janino*.jar"/>
                                    <include name="lib/antlr-*.jar"/>
                                    <include name="lib/mvel*.jar"/>
                                     <include name="lib/richfaces-api*.jar" />
                               <include name="lib/itext.jar*" />
                               <include name="lib/jfreechart*.jar" />
                               <include name="lib/jcommon*.jar" />
                            </fileset>
                    </copy>
                    <copy todir="${ear.dir}/META-INF">
                            <fileset dir="${basedir}/resources/META-INF">
                                    <include name="application.xml" />
                                    <include name="jboss-app.xml" />
                            </fileset>
                    </copy>
            </target>


            Alexander
            • 3. Re: Problem with seam-pdf
              Robert H Newbie

              Thanks for your reply. I had already included the iText jar but as I wrote I used an old version.