gradle runIde accompanied by JDOMParseException&SAXParseException

Completed

When I try to run my own plugin, the output gets spammed by these two exceptions (they are spammed once every couple of seconds), but the plugin still starts and works fine. I can not pinpoint the file with the source of the error (since the exception message only says the line number and my only XML-file, plugin.xml, looks fine).
I have looked into this issue, but the solution did not help. Also, I have lost track of when it did start to happen.
How can I get rid of them?

org.jdom.input.JDOMParseException: Error on line 40: The reference to entity "D" must end with the ';' delimiter.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:533)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:273)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:263)
at com.intellij.idea.LoggerFactory.init(LoggerFactory.java:73)
at com.intellij.idea.LoggerFactory.getLoggerInstance(LoggerFactory.java:47)
at com.intellij.openapi.diagnostic.Logger.getInstance(Logger.java:61)
at com.intellij.openapi.diagnostic.Logger.getInstance(Logger.java:66)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:125)
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.ide.plugins.PluginManager.lambda$start$0(PluginManager.java:77)
at java.lang.Thread.run(Thread.java:748)

Caused by: org.xml.sax.SAXParseException; lineNumber: 40; columnNumber: 48; The reference to entity "D" must end with the ';' delimiter.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
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 org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:273)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:263)
at com.intellij.idea.LoggerFactory.init(LoggerFactory.java:73)
at com.intellij.idea.LoggerFactory.getLoggerInstance(LoggerFactory.java:47)
at com.intellij.openapi.diagnostic.Logger.getInstance(Logger.java:61)
at com.intellij.openapi.diagnostic.Logger.getInstance(Logger.java:66)
at org.jetbrains.idea.svn.actions.MarkResolvedAction.<clinit>(MarkResolvedAction.java:50)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:139)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:476)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:464)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.preloadActions(ActionManagerImpl.java:1240)
at com.intellij.openapi.actionSystem.impl.ActionPreloader.preload(ActionPreloader.java:32)
at com.intellij.openapi.application.Preloader.lambda$null$0(Preloader.java:74)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.Preloader.lambda$initComponent$1(Preloader.java:72)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXParseException; lineNumber: 40; columnNumber: 48; The reference to entity "D" must end with the ';' delimiter.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
...

 

0
7 comments

> since the exception message only says the line number and my only XML-file, plugin.xml, looks fine

Looks like you forgot to attach the plugin.xml. Also, please attach entire IDEA log.

Linked forum topic is completely unrelated.

 

0
Avatar
Nikita Sazanovich

I thought that it should be unrelated with plugin.xml. But here they are.

  • idea.log -- not that interesting, since running 'gradle runIde' from the terminal causes the same output.
  • gradle.log -- output from the 'gradle runIde'.
  • plugin.xml -- single XML-file written by me (there are of course many XML-files in .idea/ folder).
0

plugin.xml looks ok to me.

Please attach `idea.log` of IDEA that is started from Gradle, not your IDE for development. You can find it in `build/idea-sandbox/system/log`.

`build.gradle` could be useful too.

0
Avatar
Nikita Sazanovich

Thanks for looking into it, Alexander.

I was not aware of that 'idea.log'.
But when I have tried to find this file -- it was not there. I have added the log file path, just as it was done in a runConfiguration for go-lang-idea-
plugin
 (--stacktrace --info & log file path to `/build/idea-sandbox/system/log`).

Excerpt from .idea/workspace.xml: 

 <configuration name="context-helper [runIde]" type="GradleRunConfiguration" factoryName="Gradle" singleton="true" temporary="true">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--stacktrace --info" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
</configuration>

IDEA still won't generate logs (but it generates threadDumps-... there).

Additional information:

0

The problem likely is in one of your configurations xml (or configuration xml files of the plugins installed in the debugging IDE). You can debug it and figure out what the file leads to the problem.

Also, you use outdated gradle-intellij-plugin. I don't think that this is the reason of the problem, but it's worth to update it anyway.

0
Avatar
Nikita Sazanovich

I should update it, thanks.

You are right: I should have debugged it. Actually, the problem was with the IDEA's systemName -- the path contained ampersand sign. I've moved it to an alphabetic directory and logs are written correctly now.

Thank you for helping me out!

0

Thanks for the update. Glad to hear it works for you.

0

Please sign in to leave a comment.