6 Replies Latest reply on May 12, 2010 4:13 AM by shane lee

    Cant instantiate class: org.jboss.seam.pdf.ui.UIDocument.

    aymen houissa Newbie

      Hi,
      I'm getting some instantiation error when i tried to include iText in my application
      Note: the iText Seam example works fine



      please help me..thanx.


      javax.faces.FacesException: javax.faces.FacesException: Cant instantiate class: org.jboss.seam.pdf.ui.UIDocument.
           at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:545)
           at org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:91)
           at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:243)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
           at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
           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.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.faces.FacesException: Cant instantiate class: org.jboss.seam.pdf.ui.UIDocument.
           at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1016)
           at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:539)
           ... 51 more
      Caused by: java.lang.NoClassDefFoundError: com/lowagie/text/DocWriter
           at java.lang.Class.getDeclaredConstructors0(Native Method)
           at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
           at java.lang.Class.getConstructor0(Class.java:2699)
           at java.lang.Class.newInstance0(Class.java:326)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1014)
           ... 52 more




      component.xml


      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:pdf="http://jboss.com/products/seam/pdf"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:framework="http://jboss.com/products/seam/framework"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                                      http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
                                      http://jboss.com/products/seam/pdf http://jboss.com/products/seam/pdf-2.0.xsd   
                                      http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
      
          <pdf:document-store use-extensions="true" error-page="/pdfMissing.seam" />
      <core:init debug="true" jndi-pattern="@jndiPattern@" />
      
      


      web.xml


      <?xml version="1.0" ?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           version="2.5">
      
           <!-- Ajax4jsf -->
      
           <context-param>
                <param-name>org.richfaces.SKIN</param-name>
                <param-value>blueSky</param-value>
           </context-param>
      
           <!-- Seam -->
      
           <listener>
                <listener-class>
                     org.jboss.seam.servlet.SeamListener
                </listener-class>
           </listener>
      
           <filter>
                <filter-name>Seam Filter</filter-name>
                <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
           </filter>
      
           <filter-mapping>
                <filter-name>Seam Filter</filter-name>
                <url-pattern>/*</url-pattern>
           </filter-mapping>
      
           <servlet>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <servlet-class>
                     org.jboss.seam.servlet.SeamResourceServlet
                </servlet-class>
           </servlet>
      
           <servlet-mapping>
                <servlet-name>Seam Resource Servlet</servlet-name>
                <url-pattern>/seam/resource/*</url-pattern>
           </servlet-mapping>
      
           <!-- Facelets development mode (disable in production) -->
      
           <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>true</param-value>
           </context-param>
           <!--     <context-param>-->
           <!--          <param-name>facelets.SKIP_COMMENTS</param-name>-->
           <!--          <param-value>true</param-value>-->
           <!--     </context-param>-->
      
           <!-- JSF -->
      
           <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.xhtml</param-value>
           </context-param>
      
           <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
           </servlet>
      
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.seam</url-pattern>
           </servlet-mapping>
      
           <security-constraint>
                <display-name>Restrict raw XHTML Documents</display-name>
                <web-resource-collection>
                     <web-resource-name>XHTML</web-resource-name>
                     <url-pattern>*.xhtml</url-pattern>
                </web-resource-collection>
                <auth-constraint />
           </security-constraint>
      
           <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>
      
      </web-app>
      


      please help