【问题标题】:EclipseLink Core 2.5.2 missing Import-Package javax.xml.bindEclipseLink Core 2.5.2 缺少 Import-Package javax.xml.bind
【发布时间】:2014-12-23 13:09:03
【问题描述】:

EclipseLink 包 (org.eclipse.persistence/org.eclipse.persistence.core/2.5.2) 在其标头条目 Import-Package 中缺少导入语句 javax.xml.bind。我得到了这里描述的相同错误: Glassfish 4 moxy eclipselink 2.5.2 oxm object graph troubles

我在 OSGi 中添加声明 javax.xml.bind 为 bootdelegated,否则 EclipseLink MOXy 无法正常工作。

有办法解决吗?

【问题讨论】:

标签: osgi eclipselink moxy


【解决方案1】:

您可以使用片段包修复缺少的导入,请参阅http://wiki.osgi.org/wiki/Fragment

如果主机包的清单中包含以下内容:

Bundle-SymbolicName: org.eclipse.persistence.core
Bundle-Version: 2.5.2

那么你的片段清单应该有:

Bundle-SymbolicName: org.eclipse.persistence.core.myfragment
Fragment-Host: org.eclipse.persistence.core; bundle-version="2.5.2"
Import-Package: javax.xml.bind

【讨论】:

  • 听起来很有趣...我会尝试这个解决方法。
  • 当我在做一个 osgi 项目时,我总是创建一个空的 maven 项目,它只是创建了一个空的 jar,但带有清单。这是将库修复集成到构建生命周期的最简单方法。 eclipse virgo bundlor 和 template.mf 会有很大帮助。
【解决方案2】:

在 EclipseLink 2.5.3 中修复了这个错误。 此外,EclipseLink 2.6.0 不包含此问题。

感谢您创建请求。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-18
    • 2014-04-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多