博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IntelliJ IDEA :org.jdom.input.JDOMParseException:
阅读量:5740 次
发布时间:2019-06-18

本文共 6813 字,大约阅读时间需要 22 分钟。

hot3.png

在应用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.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:69)	at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)	at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:123)	at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:99)	at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)	at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:71)	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)	at java.util.concurrent.FutureTask.run(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 2; 元素内容必须由格式正确的字符数据或标记组成。	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)	... 20 moreCaused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 2; 元素内容必须由格式正确的字符数据或标记组成。	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)	at com.sun.org.apache.xerces.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 com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:364)	at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:342)	at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:69)	at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)	at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:123)	at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:99)	at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)	at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:71)	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)	at java.util.concurrent.FutureTask.run(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)

原因:

   在从项目托管平台(如:osc git)中pull出项目代码时,若遇到版本冲突,会写入 .idea文件夹下msic.xml或module.xml文件中版本冲突信息,

形式类似SVN中检出代码冲突标记格式;

只要将其按所需内容,将冲突标记删除即可;形如(==================v10001>);

若还未能解决,可将msic.xml与module.xml两文件拷贝到其它目录,删除.idea 文件夹及下属所有文件,重新make项目后,idea会自动重新生成.idea

文件,再将此两文件(msic.xml与module.xml)拷贝到原来目录下,即可。

记录一下。

转载于:https://my.oschina.net/xiehongfei/blog/648808

你可能感兴趣的文章
【记录】JS toUpperCase toLowerCase 大写字母/小写字母转换
查看>>
在 Linux 系统中安装Load Generator ,并在windows 调用
查看>>
Visifire charts ToolBar
查看>>
Mysql查询
查看>>
数据传输流程和socket简单操作
查看>>
ProbS CF matlab源代码(二分系统)(原创作品,转载注明出处,谢谢!)
查看>>
OC中KVC的注意点
查看>>
JQ入门(至回调函数)
查看>>
【洛天依】几首歌的翻唱(无伴奏)
查看>>
OpenSSL初瞻及本系列的博文的缘由
查看>>
ISO8583接口的详细资料
查看>>
tmux不自动加载配置文件.tmux.conf
查看>>
经验分享:JavaScript小技巧
查看>>
[MOSEK] Stupid things when using mosek
查看>>
程序实例---栈的顺序实现和链式实现
查看>>
服务的使用
查看>>
Oracle 用户与模式
查看>>
MairDB 初始数据库与表 (二)
查看>>
拥在怀里
查看>>
chm文件打开,有目录无内容
查看>>