我正在使用一个库(来自OpenHealthTools的MDHT)来解析CDA XML
。
它依赖于Eclipse的一部分和Eclipse的EMF插件来完成它的工作。我已经解决了大多数依赖项,但我仍然遇到这个错误:
Could not initialize class org.eclipse.core.runtime.Platform
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.core.runtime.Platform
at org.openhealthtools.mdht.uml.cda.internal.registry.CDARegistry.load(CDARegistry.java:41)
at org.openhealthtools.mdht.uml.cda.internal.registry.CDARegistry.getEClass(CDARegistry.java:67)
at org.openhealthtools.mdht.uml.cda.internal.resource.CDALoadImpl.handleTemplate(CDALoadImpl.java:144)
at org.openhealthtools.mdht.uml.cda.internal.resource.CDALoadImpl.processNode(CDALoadImpl.java:110)
at org.openhealthtools.mdht.uml.cda.internal.resource.CDALoadImpl.traverse(CDALoadImpl.java:94)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.traverse(XMLLoadImpl.java:555)
at org.openhealthtools.mdht.uml.cda.internal.resource.CDALoadImpl.traverse(CDALoadImpl.java:95)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:406)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:615)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:579)
at org.openhealthtools.mdht.uml.cda.util.CDAUtil.load(CDAUtil.java:66)
at org.openhealthtools.mdht.uml.cda.util.CDAUtil.load(CDAUtil.java:58)
at com.mirth.results.models.serializer.CDAConverter.convertCDAToClinicalDocumentModel(CDAConverter.java:23)
at com.mirth.results.models.serializer.CDAConverterTest.testConvertCDAToClinicalDocumentModel(CDAConverterTest.java:42)
Java Result: 2
我已将Eclipse中的JAR
与org.eclipse.core.runtime.Platform
放在类路径上。它是否有其他依赖性?
答案 0 :(得分:3)
您可以尝试查看您的MDHT插件是否也需要similar set of core eclipse plugins used for ATL 特别是:
Eclipse libraries
* org.eclipse.equinox.common_3.3.*.jar
* org.eclipse.core.jobs_3.3.*.jar
* org.eclipse.core.runtime.compatibility_3.*.jar
* org.eclipse.core.runtime_3.3.*.jar
* org.eclipse.core.resources_3.3.*.jar
* org.eclipse.osgi_3.3.*.jar
(注意:这有点老 - 日食3.3 - 所以你需要将该列表调整为你正在运行的eclipse版本)