IntelliJIDEA:org.jdom.input.JDOMParseException:在应⽤osc git 或 其它项⽬托管平台结合intelliJ Idea 时,启动项⽬/Junit单元测试,会出现如下错误:
Internal error: (org.jdom.input.JDOMParseException) Error on line 9: 元素内容必须由格式正确的字符数据或标记组成。
org.jdom.input.JDOMParseException: Error on line 9: 元素内容必须由格式正确的字符数据或标记组成。
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:364)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:342)
at org.del.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:69)
at org.del.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)
at org.del.serialization.JpsProjectLoader.a(JpsProjectLoader.java:123)
at org.del.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:99)
at org.del.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)
at org.dline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
at org.dline.BuildRunner.load(BuildRunner.java:71)
at org.dline.BuildSession.runBuild(BuildSession.java:198)
at org.dline.BuildSession.run(BuildSession.java:113)
at org.dline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at urrent.Executors$RunnableAdapter.call(Unknown Source)
at urrent.FutureTask$Sync.innerRun(Unknown Source)
at urrent.FutureTask.run(Unknown Source)
at urrent.ThreadPoolExecutor.runWorker(Unknown Source)
at urrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: l.sax.SAXParseException; lineNumber: 9; columnNumber: 2; 元素内容必须由格式正确的字符数据或标记组成。
at s.internal.ateSAXParseException(Unknown Source)
at s.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at s.internal.portError(Unknown Source)
at s.internal.portError(Unknown Source)
at s.internal.portFatalError(Unknown Source)
at s.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDr
iver.startOfMarkup(Unknown Source) at s.internal.impl.(Unknown Source) at s.internal.(Unknown Source)
at s.internal.(Unknown Source)
at s.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at s.internal.parsers.XML11Configuration.parse(Unknown Source)
at s.internal.parsers.XML11Configuration.parse(Unknown Source)
at s.internal.parsers.XMLParser.parse(Unknown Source)
at s.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at s.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
... 20 more
Caused by: l.sax.SAXParseException; lineNumber: 9; columnNumber: 2; 元素内容必须由格式正确的字符数据或标记组成。
at s.internal.ateSAXParseException(Unknown Source)
at s.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at s.internal.portError(Unknown Source)
at s.internal.portError(Unknown Source)
at s.internal.portFatalError(Unknown Source)
at s.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(Unknown
Source) at s.internal.impl.(Unknown Source) at s.internal.(Unknown Source)
at s.internal.(Unknown Source)
at s.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at s.internal.parsers.XML11Configuration.parse(Unknown Source)
at s.internal.parsers.XML11Configuration.parse(Unknown Source)
at s.internal.parsers.XMLParser.parse(Unknown Source)
at s.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at s.internal.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 org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:364)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:342)
at org.del.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:69)
at org.del.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)
at org.del.serialization.JpsProjectLoader.a(JpsProjectLoader.java:123)
at org.del.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:99)
at org.del.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)
at org.dline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
at org.dline.BuildRunner.load(BuildRunner.java:71)
at org.dline.BuildSession.runBuild(BuildSession.java:198)
at org.dline.BuildSession.run(BuildSession.java:113)
at org.dline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at urrent.Executors$RunnableAdapter.call(Unknown Source)
at urrent.FutureTask$Sync.innerRun(Unknown Source)
at urrent.FutureTask.run(Unknown Source)
at urrent.ThreadPoolExecutor.runWorker(Unknown Source)intellijidea
at urrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
原因:
在从项⽬托管平台(如:osc git)中pull出项⽬代码时,若遇到版本冲突,会写⼊ .idea⽂件夹下l或l⽂件中版本冲突信息,
形式类似SVN中检出代码冲突标记格式;
只要将其按所需内容,将冲突标记删除即可;形如(==================v10001>);
若还未能解决,可将l与l两⽂件拷贝到其它⽬录,删除.idea ⽂件夹及下属所有⽂件,重新make项⽬后,idea会⾃动重新⽣成.idea
⽂件,再将此两⽂件(l与l)拷贝到原来⽬录下,即可。
记录⼀下。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。