[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690782#comment-17690782 ] ASF subversion and git services commented on NIFI-11156: Commit 22a4bce1ed19204c95de98b3962a045557f04226 in nifi's branch refs/heads/main from dan-s1 [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=22a4bce1ed ] NIFI-11156 Updated SchemaValidator to include error message for ValidateXml - Restores behavior so that XML parsing failure details will be included in FlowFile error attribute from ValidateXml This closes #6970 Signed-off-by: David Handermann > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Assignee: Daniel Stieglitz >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690783#comment-17690783 ] ASF subversion and git services commented on NIFI-11156: Commit 2ace153a7dd04a7b0b3cdb09159adab4246a8fc6 in nifi's branch refs/heads/support/nifi-1.x from dan-s1 [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2ace153a7d ] NIFI-11156 Updated SchemaValidator to include error message for ValidateXml - Restores behavior so that XML parsing failure details will be included in FlowFile error attribute from ValidateXml This closes #6970 Signed-off-by: David Handermann > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Assignee: Daniel Stieglitz >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17689240#comment-17689240 ] Adam Taft commented on NIFI-11156: -- {quote}> adjust one of the existing TestValidateXml methods to assert that the attribute message contains a stable keyword from an expected error, such as the word lineNumber.{quote} Need to be careful here. Validation can fail without a "line number". And there's a chance of catching IOException too. I'd think the unit test is just looking for the pattern "Validation failed: ${reason}" and that's probably good enough. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688795#comment-17688795 ] David Handermann commented on NIFI-11156: - Thanks for the suggestion [~taftster], sometimes the simple solutions are the best solutions! In general, repeating exception messages is not preferable, but in this situation, changing the ProcessException to use the message from the caught Exception sounds like a good solution. It should also be simple to adjust one of the existing TestValidateXml methods to assert that the attribute message contains a stable keyword from an expected error, such as the word {{lineNumber}}. That sounds like a straightforward pull request I would be glad to review. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688774#comment-17688774 ] Adam Taft commented on NIFI-11156: -- One more (maybe too obvious) solution just came to me. Arguably this might even be the best and smallest thing we could do. If we update StandardSchemaValidator to include the proper nested message when it throws, then we'd be back to square one. Specifically, line 56 becomes: throw new ProcessingException("Validation failed: " + e.getMessage(), e); In my opinion, since StandardSchemaValidator and ProcessingException effectively masked the existing error, it's ideal that these classes are the ones made to fix the issue. The one line change above does it. Additionally, as a response to the comment about "parsing" the error attribute. The use case here is not about parsing the message, it's about (as stated) logging the error message. Logging, or generating a support ticket, or evaluating the flowfile in a queue, etc. The validation messages are only human readable, yes, but that's the point. A classic use case for this is when the failure condition results in a ticket generated for a help system. If you just have some generic phrase, is at is today, "Validation failed", it gives no more context for debugging or triaging the incident. At that point, the only thing you can do with the flowfile is write it to disk or somehow capture the content so that you can run it through xmllint or equivalent external from NiFi. That's the pain being avoided with this fix, very much about logging or viewing the validation error message. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688721#comment-17688721 ] David Handermann commented on NIFI-11156: - I agree using exceptions for flow control is a poor pattern. With that in mind, the {{SchemaValidator}} and {{StandardSchemaValidator}} are intended to be thin wrappers around the JDK interfaces. {{ValidateXml}} is the only direct reference in the project right now, but maintaining the separation is helpful to keep the {{nifi-xml-processing}} library as steamlined as possible. On a similar note, passing unformatted errors in FlowFile attributes makes it difficult to do anything more than provide detail logging, although that can be useful in itself. With that background, making localized changes in ValidateXml seems like the best way forward to restore the previous behavior. If a new use were outlined describing ways to make use of more structured error handling, that could be worth considering in a subsequent issue. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688714#comment-17688714 ] Adam Taft commented on NIFI-11156: -- Without arguing about the API decisions happening in all the xml processing code (which is a different discussion), agreed that unrolling the exception chain that starts with ProcessException is probably the smallest thing that ValidateXML could do. Somewhere around line 200 of ValidateXML.java you'd want to unroll the chain that is now an extra layer deep because of the ProcessException wrapper. Hopefully you'd find your way down to a meaningful SAXException, which includes the more useful error message via #getMessage(). The ideal situation is that we wouldn't be passing around validation errors as exceptions at all. I know this design originates from the JDK, but ideally one could pass a callback or some other reference to the SchemaValidator in order to do something better than just rethrowing checked exceptions as unchecked, which is all the "value" that ProcessingException is apparently adding. But that's probably a different overhaul and effort though, especially if we don't want to change anything related to SchemaValidator and StandardSchemaValidator nor any runtime exceptions that they throw. SchemaValidator could, for example, return a ValidationResult object, so that callers don't have to trap exceptions into AtomicBoolean state to decide if it "passed" or "failed" validation. That being said, rolling out the exception chain to eventually call getMessage() on the bottom-most exception is probably the most localized update to ValidateXML that would restore the original behavior. I agree with David on this assessment, probably the recommended approach for where it's at. If on the other hand, SchemaValidator wanted to be improved, adding a return value to it would be the most ideal situation, so that callers can definitively know if validation was successful and if not what type of error they might be dealing with. Using exceptions for control flow sucks. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17686673#comment-17686673 ] David Handermann commented on NIFI-11156: - [~dstiegli1] It is also worth noting that {{ValidateXml}} can work without a Schema configured. In that scenario, the Processor simply reads the FlowFile content using an {{XMLStreamReader}}. In that scenario, an {{ErrorHandler}} would not apply. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17686669#comment-17686669 ] David Handermann commented on NIFI-11156: - [~dstiegli1] Implementing a custom {{ErrorHandler}} is another potential option, although that would require more substantive changes to both ValidateXml and the StandardSchemaValidator. In addition, other types of exceptions could occur that might not trigger an a call to the {{ErrorHandler}}. For this reason, building up a message based on the exception causes seems like the most straightforward and generic approach. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17686650#comment-17686650 ] Daniel Stieglitz commented on NIFI-11156: - [~exceptionfactory] Couldn't a [ErrorHandler |https://docs.oracle.com/javase/8/docs/api/javax/xml/validation/Validator.html#setErrorHandler-org.xml.sax.ErrorHandler-]be used to build up the messages? > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11156) ValidateXml Processor - validatexml.invalid.error = Validation failed
[ https://issues.apache.org/jira/browse/NIFI-11156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17686636#comment-17686636 ] David Handermann commented on NIFI-11156: - Thanks for describing this issue [~bilalb]. Changes to the content of the {{validatexml.invalid.error}} attribute were introduced as a result of generalized XML processing improvements in NIFI-9901. The generalized "Validation failed" message comes from the {{ProcessingException}} thrown in {{StandardSchemaValidator}}. To provide more details in the error attribute, an ideal solution would walk through the exception causes and build up the string of messages. That should allow {{StandardSchemaValidator}} to remain unchanged, and also provide the expected details in this error attribute value. > ValidateXml Processor - validatexml.invalid.error = Validation failed > - > > Key: NIFI-11156 > URL: https://issues.apache.org/jira/browse/NIFI-11156 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Affects Versions: 1.19.1 > Environment: CentOS 7.5, RedHat 7.9 > Temurin - 11.0.17+8 >Reporter: Bilal >Priority: Minor > > _NiFi_ environment was upgraded from 1.15.1 to 1.19.1. The following > situation has occurred with the _ValidateXml_ processor: > _ValidateXml_ processor works correctly on 1.15.1 and > _validatexml.invalid.error_ attribute gives an detail information about the > error. > _ValidateXml_ processor works on 1.19.1 but _validatexml.invalid.error_ > attribute does not give an detail information about the _error. > validatexml.invalid.error_ attriubute only contains “{_}Validation failed{_}” > text. > Similar problem was talked in cloudera community and Eduu said that: > === > Hi > [@ChuckE|https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065] > using NiFi 1.15.2 seems to add the error detail in the > "validatexml.invalid.error" attribute. > For example --> "cvc-minLength-valid: Value '' with length = '0' is not > facet-valid with respect to minLength '1' for type 'HotelCode" > This seems to be an issue starting from NiFi 1.16.3, maybe a bug? > You can use NiFi 1.15.2 or custom code as > [@SAMSAL|https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381] > suggested. > === > Ref: [How to get the reason for invalid > XML|[https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767/highlight/true#M235443]] -- This message was sent by Atlassian Jira (v8.20.10#820010)