分发基于 Eclipse EMF 的库需要 JARS 吗?

发布于 2024-08-21 12:05:23 字数 1798 浏览 4 评论 0原文

我正在使用一个库(来自 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 放置在一起在类路径上。它有额外的依赖吗?

I'm working with a library (MDHT from OpenHealthTools) to parse CDA XML.
It relies on parts of Eclipse and the EMF plugin for Eclipse to do its thing. I've addressed most of the dependencies, but I'm still running into this error:

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

I have placed the JAR from Eclipse with org.eclipse.core.runtime.Platform on the classpath. Does it have additional dependencies?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苹果你个爱泡泡 2024-08-28 12:05:23

您可以尝试看看是否需要用于 ATL 的类似核心 Eclipse 插件还有你的 MDHT 插件。
特别是:(

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 

注意:这有点旧——eclipse 3.3——所以你需要调整该列表以适应你正在运行的 eclipse 版本)

You can try and see if a similar set of core eclipse plugins used for ATL could be needed for your MDHT plugin as well.
Especially:

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 

(Note: this is a bit old -- eclipse 3.3 -- so you need to adapt that list to the version of eclipse you are running)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文