A quick google search revealed the following interesting articles

https://www.mkyong.com/java/sax-error-content-is-not-allowed-in-prolog/
https://stackoverflow.com/questions/3030903/content-is-not-allowed-in-prolog-when-parsing-perfectly-valid-xml-on-gae

In your plugin are you performing the parsing on the master or on the agent
(via for example file.act(...)) It shouldn't make any difference but maybe
some dirty data is suffixed in the transfer or something?

/B

Den tors 11 apr. 2019 kl 17:50 skrev Matt Q <[email protected]>:

> I am trying to call some Java code in our plugin from the jenkinsfile to
> parse XML (I have been able to parse it in the jenkinsfile but would like
> to abstract the implementation from the pipeline). I am passing an XML file
> to a method that works fine when this file is passed from within the plugin
> code but fails when I pass the very same file from the pipeline:
>
> Exception: Content is not allowed in prolog.
>
> There is no content in the prolog:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project version="27">
>   <config>
>   ...
>
> I have checked that the file is encoded in UTF-8 and several other
> suggestions but this error persists. Is this a known issue when trying to
> invoke Java from the pipeline? I can't figure out why the same code is
> behaving differently when invoked this way.
>
> -Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/279d5d75-cad5-4abe-82d0-ab438b82c056%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/279d5d75-cad5-4abe-82d0-ab438b82c056%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Robert Sandell*
Software Engineer
CloudBees, Inc.
[image: CloudBees-Logo.png] <http://www.cloudbees.com/>
E: [email protected]
Twitter: robert_sandell

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3iVryZKU-3ik8GAdgGWmucjqaBw8kXi8EknaqSUBnZdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to