XML error "is not facet-valid with respect to pattern"
book
Article ID: KB0076899
calendar_today
Updated On:
Description
In StreamBase or LiveView configuration, I get an error like this in the XML view and when I attempt to run the application:
- XML parsing error 'org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 91; cvc-pattern-valid:
Value 'C:\tmp\lvdata' is not facet-valid with respect to pattern '[^\\]*' for type
'#AnonType_folderpersistencetable-spaceliveview-configuration'.'
How can I correct this?
Issue/Introduction
Cause and correction
Resolution
The "is not facet-valid with respect to pattern" error is caused by character sequences that are not valid in the XML-encoded source files created for TIBCO Streaming applications (for example: *.sbapp and *.lvconf files).
Invalid XML characters can be back-slash (\) characters, EventFlow Expression Language escaped-identifier syntax (#'exotic name'), and non-ASCII characters (non-ASCII UTF-8 character ranges or UTF-16) in field names also used as LiveView Table column names.
Correct the error above by changing the back-slashes (\) to forward-slashes (/) in text values when they refer to directory delimiters in a file-system path. These will be converted to the correct delimiter for the Operating System when the application is run. The reason for the error is that the back-slash in XML is an escape-character and cannot be interpreted as a simple character. This is also true in many Java contexts. In some cases but not all the back-slash can be replaced by two (\\) and not raise an error.
For the above example, the corrected value is "C:/tmp/lvdata".
The "pattern" from the error message shows what characters are allowed. In all cases the value which is not compatible with XML will need to be replaced with an alternative ASCII-only value. The StreamBase editors perform conversion to equivalent XML text in most cases, but in some cases the original value must conform to XML limitations.
Feedback
thumb_up
Yes
thumb_down
No