[jboss-user] [JBoss Seam] - Seam PDF errors

damatrix do-not-reply at jboss.com
Wed Aug 1 11:44:12 EDT 2007


Hi,

I'm using Seam 1.2.1.GA and JBoss 4.0.5.GA . I have 2 issues with my use of the Seam PDF functionalities that i'll like some solutions on.

First.
I've configured the Document Store Servlet and everything else pertaining to PDF in the web.xml file. I'm able to generate PDF's alright, but i find that there is an error message on the JBoss console anytime i click a link that renders a PDF as follows:


  | 
  | java.lang.IllegalStateException: No active event context
  |         at org.jboss.seam.core.Manager.instance(Manager.java:267)
  |         at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:58)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         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.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
  |         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.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.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:619)
  | 09:41:36,900 ERROR [[Document Store Servlet]] Servlet.service() for servlet Document Store Servlet threw exception
  | java.lang.IllegalStateException: No active event context
  |         at org.jboss.seam.core.Manager.instance(Manager.java:267)
  |         at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:58)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         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.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
  |         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.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.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:619)
  |                   
  | 


Secondly

I have a facelet that sends a PDF attachment. However, when i send the email to myself and open the attached PDF i get an error in Adobe Reader  that the file cannot be opened  "Because it it either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly coded?.

This is the facelet file


  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  |                 xmlns:ui="http://java.sun.com/jsf/facelets"
  |                 xmlns:h="http://java.sun.com/jsf/html"
  |                 xmlns:f="http://java.sun.com/jsf/core"
  |                 xmlns:p="http://jboss.com/products/seam/pdf"
  |                 xmlns:rich="http://richfaces.ajax4jsf.org/rich"
  |                 template="htmlAttachment.xhtml">
  |     
  |     <ui:param name="subject" value="Fair registration" />
  |     <ui:param name="email" value="#{registration.customer.email}" />
  |     <ui:param name="name" value="#{registration.customer.fullname}" />  
  |     <ui:param name="file" value="registration_invoice.pdf"/> 
  |     <ui:define name="attach"> 
  |         <p:document>
  |             <p:font size="16" style="bold" ><p:paragraph spacingAfter="10" alignment="left"><p:text value="#{setup.company}"/></p:paragraph></p:font>                          
  |             <p:font size="12"><p:paragraph spacingAfter="30" alignment="left">&#160;</p:paragraph>
  |                 <p:paragraph spacingAfter="10" alignment="left"><p:text value="Exhibitor: #{registration.customer.fullname}"/></p:paragraph>
  |                 <p:paragraph spacingAfter="10" alignment="right"><p:text value="Date: #{registration.regdate}"/></p:paragraph>
  |                 <p:paragraph spacingAfter="10" alignment="left"><p:text value="Fair: #{registration.fair.title}"/></p:paragraph>
  | 
  | ... and more
  | 

Any help on these. Thanx

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069714#4069714

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069714



More information about the jboss-user mailing list