luchiniatwork / cambada

Packager for Clojure based on deps.edn (AKA tools.deps). Supporting jar, uberjar and GraalVM's native-image.
MIT License
222 stars 28 forks source link

SAXParseException when buliding uberjar #21

Open glittershark opened 6 years ago

glittershark commented 6 years ago

I'm getting the following stacktrace when I attempt to build an uberjar:

[Fatal Error] :1:628: The content of elements must consist of well-formed character data or markup.
ERROR:  'The content of elements must consist of well-formed character data or markup.'
Exception in thread "main" javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 628; The content of elements must consist of well-formed character data or markup.
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:740)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
        at clojure.data.xml.jvm.pprint$indent_xml.invokeStatic(pprint.clj:27)
        at clojure.data.xml.jvm.pprint$indent_xml.invoke(pprint.clj:23)
        at clojure.data.xml$indent.invokeStatic(xml.clj:158)
        at clojure.data.xml$indent.doInvoke(xml.clj:153)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:661)
        at clojure.core$apply.invoke(core.clj:652)
        at clojure.data.xml$indent_str.invokeStatic(xml.clj:164)
        at clojure.data.xml$indent_str.doInvoke(xml.clj:160)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.tools.deps.alpha.gen.pom$sync_pom.invokeStatic(pom.clj:135)
        at clojure.tools.deps.alpha.gen.pom$sync_pom.invoke(pom.clj:123)
        at cambada.jar$sync_pom.invokeStatic(jar.clj:225)
        at cambada.jar$sync_pom.invoke(jar.clj:222)
        at cambada.jar$apply_BANG_.invokeStatic(jar.clj:237)
        at cambada.jar$apply_BANG_.invoke(jar.clj:233)
        at cambada.uberjar$apply_BANG_.invokeStatic(uberjar.clj:130)
        at cambada.uberjar$apply_BANG_.invoke(uberjar.clj:129)
        at cambada.cli$runner.invokeStatic(cli.clj:120)
        at cambada.cli$runner.invoke(cli.clj:115)
        at cambada.uberjar$_main.invokeStatic(uberjar.clj:142)
        at cambada.uberjar$_main.doInvoke(uberjar.clj:140)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.core$apply.invokeStatic(core.clj:657)
        at clojure.main$main_opt.invokeStatic(main.clj:317)
        at clojure.main$main_opt.invoke(main.clj:313)
        at clojure.main$main.invokeStatic(main.clj:424)
        at clojure.main$main.doInvoke(main.clj:387)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.main.main(main.java:37)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 628; The content of elements must consist of well-formed character data or markup.
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:632)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:728)
        ... 35 more
---------
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 628; The content of elements must consist of well-formed character data or markup.
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:632)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:728)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
        at clojure.data.xml.jvm.pprint$indent_xml.invokeStatic(pprint.clj:27)
        at clojure.data.xml.jvm.pprint$indent_xml.invoke(pprint.clj:23)
        at clojure.data.xml$indent.invokeStatic(xml.clj:158)
        at clojure.data.xml$indent.doInvoke(xml.clj:153)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:661)
        at clojure.core$apply.invoke(core.clj:652)
        at clojure.data.xml$indent_str.invokeStatic(xml.clj:164)
        at clojure.data.xml$indent_str.doInvoke(xml.clj:160)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.tools.deps.alpha.gen.pom$sync_pom.invokeStatic(pom.clj:135)
        at clojure.tools.deps.alpha.gen.pom$sync_pom.invoke(pom.clj:123)
        at cambada.jar$sync_pom.invokeStatic(jar.clj:225)
        at cambada.jar$sync_pom.invoke(jar.clj:222)
        at cambada.jar$apply_BANG_.invokeStatic(jar.clj:237)
        at cambada.jar$apply_BANG_.invoke(jar.clj:233)
        at cambada.uberjar$apply_BANG_.invokeStatic(uberjar.clj:130)
        at cambada.uberjar$apply_BANG_.invoke(uberjar.clj:129)
        at cambada.cli$runner.invokeStatic(cli.clj:120)
        at cambada.cli$runner.invoke(cli.clj:115)
        at cambada.uberjar$_main.invokeStatic(uberjar.clj:142)
        at cambada.uberjar$_main.doInvoke(uberjar.clj:140)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.core$apply.invokeStatic(core.clj:657)
        at clojure.main$main_opt.invokeStatic(main.clj:317)
        at clojure.main$main_opt.invoke(main.clj:313)
        at clojure.main$main.invokeStatic(main.clj:424)
        at clojure.main$main.doInvoke(main.clj:387)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.main.main(main.java:37)
fdamirv commented 5 years ago

I am getting the following:

Error printing return value (XMLStreamException) at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl/next (XMLStreamReaderImpl.java:599).
ParseError at [row,col]:[269,8]
Message: Stream closed
...
fdamirv commented 3 years ago

There is fix by DeLaGuardo: https://github.com/DeLaGuardo/cambada/commit/a1645af605094c3ab823d4c58c36a943eca434dd

Here is also a palliative fix: https://github.com/mikeananev/cambada/commit/daf3c15668d0c03efeb622edf128a00d9e5a1923#diff-270e542a3a7e01fc9307ad89f0e577d999d2e46e4481004f86b4644800171fa3R196 So #21 is not reproduced in [cambada "1.0.7"] at clojars