Results 1 to 10 of 10

Thread: XML NODE: ERROR processing instruction target matching "[xX][mM][lL]"

  1. #1

    Exclamation XML NODE: ERROR processing instruction target matching "[xX][mM][lL]"

    Please find the problem regarding the error while parsing the xml.

    2014-08-04 06:54:34.624; ERROR: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    At Line 2, Column 6.
    com.lavastorm.brain.nodes.ldr.XmlData.parseData(Xm lData.java:181)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p arseRecordData(StructuredDataNode.java:1417)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessMetadata(StructuredDataNode.java:1293)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessSinglePass(StructuredDataNode.java:911)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessAll(StructuredDataNode.java:654)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.nodeProcess(NodeWrapper.java:527)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.run(NodeWrapper.java:769)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.main(NodeWrapper.java:1466)

    id: 5 chain: 0 group: 0
    javaDetail: com.lavastorm.brain.nodes.ldr.StructuredDataNode.l ogAndWriteError(StructuredDataNode.java@1823)
    dataDetail:
    Data(out)
    Structure(out)
    Errors(out) row: 0
    columns: ['_ErrorCode', 'java.lang.String'], ['_Error', 'com.lavastorm.lang.UnicodeString'], ['_RecordNumber', 'java.lang.Long']

    2014-08-04 06:54:34.640; ERROR: brain.nodes.ldr.errorThresholdReached
    id: 7 chain: 6 group: 0
    javaExceptionDetail: com.lavastorm.logging.LoggableException: 'The error threshold of 1 has been reached.';
    stack trace:
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.l ogAndWriteError(StructuredDataNode.java@1835)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.a ddError(StructuredDataNode.java@1841)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.a ddError(StructuredDataNode.java@1849)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p arseRecordData(StructuredDataNode.java@1435)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessMetadata(StructuredDataNode.java@1293)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessSinglePass(StructuredDataNode.java@911)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessAll(StructuredDataNode.java@654)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.nodeProcess(NodeWrapper.java@527)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.run(NodeWrapper.java@769)
    com.lavastorm.brain.execution.java.node.NodeWrappe r.main(NodeWrapper.java@1466)
    javaDetail: com.lavastorm.brain.nodes.ldr.StructuredDataNode.p rocessAll(StructuredDataNode.java@664)
    dataDetail:
    Data(out)
    Structure(out)
    Errors(out) row: 1
    columns: ['_ErrorCode', 'java.lang.String'], ['_Error', 'com.lavastorm.lang.UnicodeString'], ['_RecordNumber', 'java.lang.Long']
    records:
    [com.lavastorm.brain.nodes.ldr.XmlData$LocationBase dExceptionProvider, The processing instruction target matching "[xX][mM][lL]" is not allowed.
    At Line 2, Column 6.
    com.lavastorm.brain.nodes.ldr.XmlData.parseData(Xm lData.java:181)
    com.lavastorm.brain.nodes.ldr.StructuredDataNode.p arseRecordData(StructuredDataNode.java:141..., -1]

    2014-08-04 06:54:34.640; ERROR: Node failed.
    id: 9 chain: 8 group: 0
    javaDetail: com.lavastorm.brain.execution.java.node.NodeWrappe r.run(NodeWrapper.java@799)

    Thanks.

  2. #2
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    Hi,

    This sort of error generally occurs if you set "WellFormedXml" to false, but the XML contains a header definition of the form:

    Code:
    <?xml verion="[someVersion]" ...?>
    If you set "WellFormedXml" to false, the node wraps the XML structure in a root-tag to ensure that it will be presented to the XML parser in a well formed manner such that processing will not error. However, if there is an XML header - such as that shown above, this will cause the node to fail as the <?xml ...?> header cannot be present anywhere other than at the start of the XML document.

    If you set the parameter "WellFormedXml" to true, this should resolve the problem.

    What version of the LAL library are you using by the way?

    The node is designed to catch such errors and report them in a more meaningful manner to assist with this problem.
    For instance, when I try and recreate the problem, I receive the error message:

    ERROR: An error occurred parsing XML data:
    The processing instruction target matching "[xX][mM][lL]" is not allowed.
    This error typically indicates that the XML is well-formed and contains a header element but the parameter WellFormedXml is set to false.
    Considering setting the parameter to true.
    There may be an issue in the version of the node that you are using where this particular type of error is not being caught and handled correctly to produce the more meaningful error message.

    If you can provide the LAL version you are using, we should be able to fix this so that it reports the more meaningful error again (or it may have just been fixed in a later release already).

    Tim.

  3. #3

    Default

    LAL version : LAL 2.18.0 4.6
    LAE : Lavastorm_Analytics_Engine__4.6.1.2.9

    WellFormedXml is set to true, but the problem still exists!
    Please check the snap of the setting.
    Capture.JPG

  4. #4
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    In that case, is there anything in the XML document prior to the XML header (<?xml ..?>)?

    If a header is present I'm pretty sure that it needs to be the first thing that appears in the file (I think even before any empty lines or space characters).
    Can you check if that is the case with your XML document?

  5. #5

    Default

    Header of XML file is:

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="MeasDataCollection.xsl" ?>
    <!DOCTYPE mdc SYSTEM "MeasDataCollection.dtd">
    <mdc xmlns:HTML="http://www.w3.org/TR/REC-xml">
    <mfh>
    ....

    MeasDataCollection.dtd is the grammer by which the xml parses. I tried to execute by keeping it in the same folder but it did not worked. (For testing I ran the xml on firefox with dtd file in the same folder it parses. So it is working. Only problem is that with LAE xml reader it is giving this error.)

  6. #6
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    Hi,

    Ok, it looks like the node is not correctly handling the <?xml-stylesheet ....?> processing instruction.
    I've raised a bug in our bug tracking system (reference #1434) to ensure that this gets investigated.

    For now though, if you are able to modify the source XML and comment out the second line (<?xml-stylesheet type ......?>) or remove it, then the node should be able to process your XML document.

    Tim.

  7. #7

    Default

    Hi,

    I ran into the same problem with an XML file, the odd thing is that the XML Node works on the development environment but it does not work on the Acceptance environment.
    Header of file : <?xml version="1.0" encoding="UTF-8"?>
    Any ideas how i can solve this?

  8. #8
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    Hi,

    Are there any other <?xml ....> lines immediately after that header?
    If not, do you have WellFormedXml set to true?

    Tim.

  9. #9

    Default

    a blank line after <?xml...> , yes I tested with true and false and still the same error.

    Cristi.

  10. #10
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    Can you post the error message?
    Does the error message reference a line and column number in the xml file?
    If so, is there an additional <?xml....> entry at that line and column number?
    It seems like you might be seeing the same problem as originally reported in this thread, just trying to verify/confirm.

    Tim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •