You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Eriks Dobelis (JIRA)" <ji...@apache.org> on 2006/10/04 08:21:20 UTC

[jira] Updated: (OFBIZ-357) PDF invoice for Party group

     [ http://issues.apache.org/jira/browse/OFBIZ-357?page=all ]

Eriks Dobelis updated OFBIZ-357:
--------------------------------

    Attachment: viewinvoice.diff

Thanks, Jacopo! It really worked. This diff does just what you suggested. 

As I have not seen ?xml been used in many places I suspect that the same problem might happen if there was "&" in address, phone, product name, etc. May be replacing of "&" (or any other special characters in the context) should be done in the method rendering FOP file?

> PDF invoice for Party group
> ---------------------------
>
>                 Key: OFBIZ-357
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-357
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Eriks Dobelis
>            Priority: Minor
>         Attachments: viewinvoice.diff
>
>
> If I try to display PDF invoice which has billing party as a party group, I get error from Adobe reader "invalid pdf..." and following lines in log file:
> 748993264[     RequestHandler.java:538:INFO ] servletName=control, view=InvoicePDF
> 748993296[  ServiceDispatcher.java:450:DEBUG] [[Sync service finished- total:0.0030,since last(Begin):0.0030]] - 'accounting / getPartyNameForDate'
> 748993304[     ControlServlet.java:186:ERROR]
> ---- exception report ----------------------------------------------------------
> Error in request handler:
> Exception: org.xml.sax.SAXParseException
> Message: The entity name must immediately follow the '&' in the entity reference.
> ---- stack trace ---------------------------------------------------------------
> org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
> org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
> org.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:252)
> org.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:177)
> org.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:167)
> org.ofbiz.widget.screen.ScreenFopPdfViewHandler.render(ScreenFopPdfViewHandler.java:106)
> org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:603)
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:388)
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:183)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:249)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> java.lang.Thread.run(Thread.java:595)
> --------------------------------------------------------------------------------
> 748993305[     ControlServlet.java:200:ERROR] An error occurred, going to the errorPage: /error/error.jsp
> 748993305[     ControlServlet.java:207:ERROR] Including errorPage: /error/error.jsp
> 748993311[     ControlServlet.java:250:DEBUG] [[[invoice.pdf] Done rendering page, Servlet Finished- total:0.049,since last([invoice.pdf] Set...):0.049]]
> I don't understand the problem yet, but it comes from the following line of applications/accounting/webapp/accountin
> g/invoice/viewInvoice.fo.ftl file:
>                 <fo:block>${billingPartyNameResult.fullName?default(billingAddress.toName)?default("Billing Name Not Found")}</fo:block>
> Probably the getPartyNameForDate returns some confusing value as fullName, but I haven't mastered FOP to understand the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira