0 Replies Latest reply on Aug 19, 2008 6:14 PM by Bejoy John

    seam attachment

    Bejoy John Newbie
      I am making a attachment to seam mail.

      <m:attachment value="#{PosterCreator.pdfbytes}" contentType="application/pdf">

      here pdfbytes takes the bdf bytes that I am making out of the pdf which I make out of Itext.

      java code
      out = hsr.getOutputStream();
      baos.writeTo(out);
      pdfbytes = baos.toByteArray();

      hear I am using
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ServletOutputStream out; to down load the pdf from the server side to client side which works fine.

      gets me error.

      10:00:44,874 ERROR [STDERR] javax.faces.FacesException: Expected parameter value, got "null"
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.mail.ui.UIAttachment.encodeEnd(UIAttachment.java:181)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:165)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:206)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:160)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:78)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:169)
      10:00:44,874 ERROR [STDERR] at com.nxj.network.np.ejb.PosterCreator.postercreator.sendEmailsTonxj(postercreator.java:342)
      10:00:44,874 ERROR [STDERR] at com.nxj.network.np.ejb.PosterCreator.postercreator.CreatePdf(postercreator.java:517)
      10:00:44,874 ERROR [STDERR] at com.nxj.network.np.ejb.PosterCreator.postercreator.Complete_Order(postercreator.java:259)
      10:00:44,874 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      10:00:44,874 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      10:00:44,874 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      10:00:44,874 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      10:00:44,874 ERROR [STDERR] at com.nxj.network.np.ejb.PosterCreator.postercreator_$$_javassist_15.Complete_Order(postercreator_$$_javassist_15.java)
      10:00:44,874 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      10:00:44,874 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      10:00:44,874 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      10:00:44,874 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      10:00:44,874 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
      10:00:44,874 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
      10:00:44,874 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      10:00:44,874 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      10:00:44,874 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      10:00:44,874 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      10:00:44,874 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      10:00:44,874 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      10:00:44,874 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
      10:00:44,874 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      10:00:44,874 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      10:00:44,874 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      10:00:44,874 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:00:44,874 ERROR [STDERR] at com.opensymphony.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:56)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      10:00:44,874 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      10:00:44,874 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:00:44,874 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:00:44,874 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      10:00:44,890 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      10:00:44,890 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      10:00:44,890 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      10:00:44,890 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      10:00:44,890 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      10:00:44,890 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      10:00:44,890 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      10:00:44,890 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      10:00:44,890 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      10:00:44,890 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      10:00:44,890 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      10:00:44,890 ERROR [STDERR] Caused by: javax.mail.internet.ParseException: Expected parameter value, got "null"
      10:00:44,890 ERROR [STDERR] at javax.mail.internet.ParameterList.<init>(ParameterList.java:169)
      10:00:44,890 ERROR [STDERR] at javax.mail.internet.ContentDisposition.<init>(ContentDisposition.java:87)
      10:00:44,890 ERROR [STDERR] at javax.mail.internet.MimeBodyPart.setDisposition(MimeBodyPart.java:1055)
      10:00:44,890 ERROR [STDERR] at javax.mail.internet.MimeBodyPart.setDisposition(MimeBodyPart.java:313)
      10:00:44,890 ERROR [STDERR] at org.jboss.seam.mail.ui.UIAttachment.encodeEnd(UIAttachment.java:169)
      10:00:44,890 ERROR [STDERR] ... 92 more

      I am getting no clue where am I going wrong.. could suggets what need to be done for this..

      Thanks and regards
      JB
      ``