Invalid property encountered

0
Hi all, I’m using the PDF generator, passing in an object of the fields listed in the document template.  Now I’m getting an error, frankly I’m not sure why.  Having been here before, I know that if I have HTML in the text fields it must be changed to be XHTML compatible (e.g., <b> must become <b/>, and such as “&” changes).  The error I’m getting current does not give me the description for how to identify what may be at issue.  The error&stack (partial) is as: com.mendix.modules.microflowengine.MicroflowException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1) at Reporting.ACT_RAReport_From_RAModule (DocumentExport : 'Generate PDF (.pdf) document using template 'RiskAssessmentReport_template'') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:83) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1) at com.mendix.documentexporter.documents.PDFDocument.generateInputStream(PDFDocument.java:67) Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1) at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(ContentHandlerProxy.java:545) at net.sf.saxon.event.ContentHandlerProxy.startElement(ContentHandlerProxy.java:383) at net.sf.saxon.event.ProxyReceiver.startElement(ProxyReceiver.java:139) at net.sf.saxon.event.SequenceNormalizer.startElement(SequenceNormalizer.java:84) at net.sf.saxon.event.NamespaceReducer.startElement(NamespaceReducer.java:75) at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:319) at net.sf.saxon.dom.DOMSender.walkNode(DOMSender.java:235) at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:320) at net.sf.saxon.dom.DOMSender.walkNode(DOMSender.java:235) at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:320) So does the reference to XPathException mean that one of my XPaths in the passed in object is at issue?   What about the “fo:basic-link” and “position -1:-1”, what does that tell me?   Thanks in advance for any guidance you can give me on this.   BR, Keith
asked
3 answers
0

Cleanup your /userlib, search for duplicate jar-files and from the duplicates, remove the oldest. Once you have no more duplicates, delete folder /deployment, in StudioPro press F4 (synchronize Project directory), then App →  Clean deployment directory and restart your app.

answered
0

Thanks Tim, I followed those instructions, finding a few files that appeared as duplicated (e.g., commons-io-2.3.jar and commons-io-2-6.jar) and having removed those, I launched StudioPro and the project where I synchronized (F4) and did an App-Clean Deployment.

When I launched the application and stepped back to the point of Generate PDF microflow action, I still received the error.  The error appears the same: e.g., 

Invalid property encountered on "fo:basic-link": display (See position -1:-1)

An error has occurred while handling the request. [User 'MxAdmin' with session id 'd11384cd-XXXX-XXXX-XXXX-XXXXXXXX1f57' and roles 'XAdministrator']

--------

com.mendix.modules.microflowengine.MicroflowException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1)
    at Reporting.ACT_RAReport_From_RAModule (DocumentExport : 'Generate PDF (.pdf) document using template 'RiskAssessmentReport_template'')

Advanced stacktrace:
    at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:83)

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1)
    at com.mendix.documentexporter.documents.PDFDocument.generateInputStream(PDFDocument.java:67)

Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:basic-link": display (See position -1:-1)
    at net.sf.saxon.event.ContentHandlerProxy.handleSAXException(ContentHandlerProxy.java:545)
    at net.sf.saxon.event.ContentHandlerProxy.startElement(ContentHandlerProxy.java:383)
    at net.sf.saxon.event.ProxyReceiver.startElement(ProxyReceiver.java:139)
    at net.sf.saxon.event.SequenceNormalizer.startElement(SequenceNormalizer.java:84)
    at net.sf.saxon.event.NamespaceReducer.startElement(NamespaceReducer.java:75)
    at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:319)
    at net.sf.saxon.dom.DOMSender.walkNode(DOMSender.java:235)
    at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:320)
    at net.sf.saxon.dom.DOMSender.walkNode(DOMSender.java:235)
    at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:320)
    at net.sf.saxon.dom.DOMSender.walkNode(DOMSender.java:235)
    at net.sf.saxon.dom.DOMSender.outputElement(DOMSender.java:320)
:

:

Which seems to indicate some sort of invalid input to the PDF DocumentGeneration, but nothing looks like a property that I’m familiar with.

Thank you again,

Keith

 

answered
0

To follow up, I believe that the issue is the Data… it appears that I have some HTML elements which are not formatted correctly for XHTML as required.  I’ve isolated the fields which are causing the error so now the task is to sanitize the data.

 

Thank you for effort put into considerations for a resolution here.

 

answered