voyent
Integration with Seam PDF and Icefaces  XML
Forum Index -> JBoss Seam Integration
Author Message
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


I just try to do a simple example and i find here in the forum the same problem:

Code:
 avax.faces.FacesException: Problem in renderResponse: null
 	at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:294)
 .....................
 


It's solved?
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


A sample has been attached to ICEfaces jira 2114 using jsf-delegation. Please see if this approach assists you.
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


Doesn' works for me. My files:

faces-config.xml
Code:
 <?xml version='1.0' encoding='UTF-8'?>
 <!DOCTYPE faces-config PUBLIC
           "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
           "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
 
 <faces-config>
 <application>
         <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
     </application>
    <application>
       <view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
      
    </application>
 
  
   
 	
 </faces-config>
 


web.xml
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
  
    <!-- Seam (using Icefaces) generated project-->
 
     <!-- listeners required for this application -->
  
   <listener>
     <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
   </listener>
   <listener>
     <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
   </listener>
   
    <!-- filters -->
    
   <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>
   
     <!-- JSF -->
 
     
    <!-- Facelets development mode (disable in production) -->
    
    
   <context-param>
     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
     <param-value>server</param-value>
   </context-param>
   <context-param>
     <param-name>facelets.DEVELOPMENT</param-name>
     <param-value>true</param-value>
   </context-param>
   <context-param>
     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     <param-value>.xhtml</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.actionURLSuffix</param-name>
     <param-value>.seam</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.synchronousUpdate</param-name>
     <param-value>false</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
     <param-value>true</param-value>
   </context-param>
   <context-param>
     <param-name>org.icesoft.examples.serverClock</param-name>
     <param-value>false</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.standardRequestScope</param-name>
     <param-value>true</param-value>
   </context-param>
   
    <!-- servlets -->
    
   <servlet>
     <servlet-name>Faces Servlet</servlet-name>
     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet>
     <servlet-name>Seam Resource Servlet</servlet-name>
     <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
   </servlet>
   <servlet>
     <servlet-name>Persistent Faces Servlet</servlet-name>
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet>
     <servlet-name>Blocking Servlet</servlet-name>
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
    <servlet>
         <servlet-name>Document Store Servlet</servlet-name>
         <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
     </servlet>
     
 <!-- servlet mappings -->  
   
   
   
   <servlet-mapping>
     <servlet-name>Persistent Faces Servlet</servlet-name>
     <url-pattern>*.seam</url-pattern>
   </servlet-mapping>
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
      <servlet-mapping>
         <servlet-name>Document Store Servlet</servlet-name>
         <url-pattern>*.pdf</url-pattern>
     </servlet-mapping>
   <servlet-mapping>
     <servlet-name>Persistent Faces Servlet</servlet-name>
     <url-pattern>/xmlhttp/*</url-pattern>
   </servlet-mapping>
   <servlet-mapping>
     <servlet-name>Blocking Servlet</servlet-name>
     <url-pattern>/block/*</url-pattern>
   </servlet-mapping>
   <servlet-mapping>
     <servlet-name>Seam Resource Servlet</servlet-name>
     <url-pattern>/seam/resource/*</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>
   
   <session-config>
         <session-timeout>10</session-timeout> 
     </session-config>
 
 
 </web-app>
 



In my pages.xml, I do:

Code:
 <rule if-outcome="aidf">
             	<redirect view-id="/config/facelets/relatorio.jsf" />
                         </rule>
 



In my relatorio.xhtml:

Code:
 
 <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" 
             type="PDF" 
             title="barcode">
     <p:header>
         <p:paragraph>
             Test
         </p:paragraph>
     </p:header>
     
 
 </p:document>
 
 


The same error:

Code:
 
 javax.faces.FacesException: Problem in renderResponse: null
 	at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:294)
 	at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
 



What's happing?

judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


trying doing a redirect from a commandLink on the page (similar to the example). Did you try the example and did it work for you?
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


Well Judy, I do this:

Code:
 <ice:outputLink value="./config/facelets/relatorio.jsf">RELATORIO>
         					<s:conversationId/>
         					</ice:outputLink>
 


And the error was:

Code:
 
 ava.lang.NoClassDefFoundError: com/lowagie/text/xml/simpleparser/EntitiesToUnicode
 	at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:241)
 


I think that it's so close... What .jar contains this class?

judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


Did you not build the example? It has all the necessary jars. This particular one is jboss-seam-pdf.jar, but I would really recommend building the example and checking the packaging/configuration.
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


Judy, I use Glassfish indeed JBoss...I just took a look in main files and just tried follow the example =)

judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


Yeah....In future I'll try to make build targets for both jboss and glassfish. Still, once you build the jboss example, you will see at least which libs you require.
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


It's works Judy! Was missing itext-1.1.4.jar and iText-2.1.5 =)

Great! Thanks one more time!

Best Regards!
allanbruno

Joined: 30/Dec/2008 00:00:00
Messages: 38
Offline


Well, when it's just fine, the images is not loaded...

I try with
Code:
 <p:image alignment="right" wrap="true" value="/jboss.jpg" /> 
 


And i put the image all over my application, but the error is the same:

Code:
 java.lang.NullPointerException
 	at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
 	at com.lowagie.text.Image.getInstance(Unknown Source)
 	at org.jboss.seam.pdf.ui.UIImage.createITextObject(UIImage.java:161
 



After all this, i try:

Code:
 
  String mImagem = "jboss.jpg";
     	 
       	 Image imagem = Toolkit.getDefaultToolkit().getImage(mImagem);
       	 this.fsscInscricaoContribuinte.setImagemTitulo(imagem);
 
 


and so:

Code:
 <p:image alignment="right" wrap="true" imageData="#{fsscInscricaoContribuinte.imagemTitulo}"/>
 
 


And o got the same error!

Whats happening?

 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team