[jboss-user] [JBoss Seam] - Seam PDF and IceFaces NPE
ivanflorentin
do-not-reply at jboss.com
Sun May 13 15:55:21 EDT 2007
I have problems integrating Seam-PDF with IceFaces.
I have the following test scenario:
jboss-seam-1.2.1-GA
project: itext example from seam 1.2.1GA
jboss-as-4.0.5-ejb3
Starting with a working project from the examples I added Icefaces jars and modified the web.xml accordingly. I tested with iceFaces 1.5.3 and 1.6.0DR4. with and without jsf-facelets.jar and i get the following exception:
| ERROR [D2DFaceletViewHandler] Problem in renderResponse: java.lang.NullPointerException
| java.lang.RuntimeException: java.lang.NullPointerException
| at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:265)
| at org.jboss.seam.pdf.ui.UIDocument.encodeBegin(UIDocument.java:222)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:579)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
| at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:276)
| at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:406)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| 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.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| 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(Thread.java:595)
| Caused by: java.lang.NullPointerException
| at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:393)
| at com.icesoft.faces.context.DOMResponseWriter.writeDOM(DOMResponseWriter.java:313)
| at com.icesoft.faces.context.DOMResponseWriter.cloneWithWriter(DOMResponseWriter.java:259)
| at org.jboss.seam.pdf.ui.ITextComponent.extractText(ITextComponent.java:210)
| 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 org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:235)
| at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:263)
| ... 31 more
|
my web.xml:
| <?xml version="1.0" ?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
|
|
| <!-- for pdf -->
|
| <filter>
| <filter-name>Seam Servlet Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Servlet Filter</filter-name>
| <url-pattern>*.pdf</url-pattern>
| </filter-mapping>
|
| <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>
|
| <!-- listeners required for this application -->
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
| </listener>
| <!-- Uncomment this to usa IceFaces 1.6.0DR4 -->
| <listener>
| <listener-class>com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Listener</listener-class>
| </listener>
|
| <!-- context parameters -->
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</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.jboss.seam.core.init.debug</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.uploadDirectory</param-name>
| <param-value>/</param-value>
| </context-param>
|
| <!-- filters -->
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <!-- Source Code reader servlet-->
| <servlet>
| <servlet-name>SourceCode Reader</servlet-name>
| <servlet-class>com.icesoft.icefaces.samples.showcase.util.SourceCodeLoaderServlet</servlet-class>
| </servlet>
|
| <!-- file upload Servlet -->
| <servlet>
| <servlet-name>uploadServlet</servlet-name>
| <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
| <load-on-startup> 1 </load-on-startup>
| </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 mapping -->
|
| <!-- file upload Mapping -->
| <servlet-mapping>
| <servlet-name>uploadServlet</servlet-name>
| <url-pattern>/uploadHtml</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>/xmlhttp/*</url-pattern>
| </servlet-mapping>
| <!-- Blocking Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Blocking Servlet</servlet-name>
| <url-pattern>/block/*</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>SourceCode Reader</servlet-name>
| <url-pattern>/sourcecodeStream.html</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>SourceCode Reader</servlet-name>
| <url-pattern>/sourcecodeStream.html</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>
| <role-name>NONE</role-name>
| </auth-constraint>
| </security-constraint>
| </web-app>
|
|
|
Any Experience or sugestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045305#4045305
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045305
More information about the jboss-user
mailing list