使用CFPDFFORM构建PDF时,ColdFusion出现奇怪错误

时间:2013-08-28 21:47:59

标签: pdf coldfusion jboss

我在两个生产系统中的一个上遇到此问题。据我所知,两个系统都与我可以制作的系统完全相同,但服务器2返回时出现此错误:

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator. 

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
An exception has occured in the processing of PDF forms.

''

The error occurred in /opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm: line 1
Called from /opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm: line 1
Called from /opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm: line 1
Called from /opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm: line 1
1 :         <cfpdfform source="/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/test.pdf" action="populate">
2 :             <!---cfpdfformparam name="source_system_id" value="steve"--->
3 :         </cfpdfform>
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser     Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
Remote Address      10.71.236.245
Referrer    
Date/Time   28-Aug-13 03:28 PM
Stack Trace
at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1) 
 at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1) 
 at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1) at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1) 

org.jdom.input.JDOMParseException: Error on line 1: Attribute name "xml:xml" associated with an element type "xfdf" must be followed by the ' = ' character.
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:533)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
    at coldfusion.pdf.XFDFDataXMLGenerator.createFormXMLData(XFDFDataXMLGenerator.java:84)
    at coldfusion.tagext.lang.PDFFormTag.doEndTag(PDFFormTag.java:328)
    at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:449)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
    at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
    at coldfusion.CfmServlet.service(CfmServlet.java:219)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 52; Attribute name "xml:xml" associated with an element type "xfdf" must be followed by the ' = ' character.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
    ... 48 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 52; Attribute name "xml:xml" associated with an element type "xfdf" must be followed by the ' = ' character.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
    at coldfusion.pdf.XFDFDataXMLGenerator.createFormXMLData(XFDFDataXMLGenerator.java:84)
    at coldfusion.tagext.lang.PDFFormTag.doEndTag(PDFFormTag.java:328)
    at cfpdf2ecfm1382985840.runPage(/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/pdf.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:449)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
    at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
    at coldfusion.CfmServlet.service(CfmServlet.java:219)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
    at java.lang.Thread.run(Thread.java:722)

代码如下所示:

<cfpdfform
    source="/opt/hrms/jboss-ewp-5.2/jboss-as-web/server/default/deploy/cfusion.war/test.pdf"     
    action="populate">
</cfpdfform>

但是其他服务器显示PDF就好了。如何确定更多信息以帮助我解决此问题?

提前致谢

-- Charles

1 个答案:

答案 0 :(得分:1)

我们找到了一种可以解决我们当前问题的解决方法,但并非没有涉及到一些痛苦。

ColdFusion documentation wiki中,cfpdfform标记中允许您使用新属性,允许您在xml上指定fdf作为将数据填充到表单中的临时步骤。在cfpdfform标记中设置fdf="true"以跳过XML并改为使用FDF。无论那是什么......

不幸的是,这是我们CF网站的代码更改,其中有一些中等深远的影响。但我们很快就会实施它。如果有更多可用,我会再次在这里发布。感谢。