I have to debug a project that uses scala.xml from Scala 2.8.1. A bug that I have presents the following stacktrace (irrelevant parts omitted):
--- more xerces stacktrace lines ---
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
at scala.xml.XML$.loadXML(XML.scala:40)
at scala.xml.factory.XMLLoader$class.loadString(XMLLoader.scala:59)
at scala.xml.XML$.loadString(XML.scala:40)
at pt.cnbc.wikimodels.util.SBMLHandler.wrapHTML(SBMLHandler.scala:99)
I’m using Intellij IDEA and I would like to click on the stacktrace line and go to the source even in the lines that currently say “Unknown Source”.
Note that:
- the XML file that gives the error is valid (and big)
- I only call XML.loadString after obtaining the content of the file
- I don’t mind doing something that escapes IDEA realm if you have a different “idea”. 🙂
Lines that say
Unknown Sourcescome from files that are missing debug info. In this caseXerces. IntelliJ has nothing to do with it. What you could do (but I haven’t tried it) is to get sources for Xerces and recompile them insuring that debug info is included. Then use resulting jar in your classpath.