You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Daniel Stieglitz (Jira)" <ji...@apache.org> on 2022/12/16 16:27:00 UTC

[jira] (NIFI-6498) XMLTransform processor: XSLT doesn't give detail error message with line number

    [ https://issues.apache.org/jira/browse/NIFI-6498 ]


    Daniel Stieglitz deleted comment on NIFI-6498:
    ----------------------------------------

was (Author: JIRAUSER294662):
[~nverwer] I wanted to address your earlier statement

{quote}

Saxon uses an ErrorListener when compiling a stylesheet. The net.sf.saxon.lib.StandardErrorListener writes messages to System.err, if nothing else is specified. Where they end up is unclear to me.

{quote}

I notice that the messages are ending up in the nifi-bootstrap.log.

> XMLTransform processor: XSLT doesn't give detail error message with line number
> -------------------------------------------------------------------------------
>
>                 Key: NIFI-6498
>                 URL: https://issues.apache.org/jira/browse/NIFI-6498
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.10.0, 1.9.2
>            Reporter: Raymond
>            Assignee: Daniel Stieglitz
>            Priority: Major
>         Attachments: 0001-Add-support-for-Saxon-error-messages-and-functions.patch, 0001-Add-support-for-Saxon-error-messages-and-functions.patch
>
>
> When something is wrong with the XSLT in the XMLTransform processor you get an error, but this is only a general error without any details or the line number where the parsing error occurs. For example when using Saxon from example I get the following error:
> Error on line 17 column 5 SXXP0003: Error reported by XML parser: The element type "xsl:tomplate" must be terminated by the matching end-tag "</xsl:tomplate>".
> When using NiFi the following error is printed:
> 11:07:43 CEST
> ERROR
> 2b4c1dab-3a87-175f-f817-3f3c72af4102
> TransformXml[id=2b4c1dab-3a87-175f-f817-3f3c72af4102] Unable to transform StandardFlowFileRecord[uuid=c4dde8e5-89b0-4f29-8f2d-a97a009cf843,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1564391260760-1, container=default, section=1], offset=0, length=6380],offset=0,name=c4dde8e5-89b0-4f29-8f2d-a97a009cf843,size=6380] due to IOException thrown from TransformXml[id=2b4c1dab-3a87-175f-f817-3f3c72af4102]: java.io.IOException: java.util.concurrent.ExecutionException: javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: Stylesheet compilation failed: 1 error reported: org.apache.nifi.processor.exception.ProcessException: IOException thrown from TransformXml[id=2b4c1dab-3a87-175f-f817-3f3c72af4102]: java.io.IOException: java.util.concurrent.ExecutionException: javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: Stylesheet compilation failed: 1 error reported
> The error in NiFi gives almost no information for debugging. Would be a big improvement if the Saxon error message is catched and add to the NiFi error message (bulletin board).
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)