OSGI包错误 - 包4中未解决的约束:包; (包= com.sun.org.apache.xerces.internal.parsers)

时间:2010-07-12 09:19:07

标签: maven-2 osgi

我是OSGI捆绑开发的新手。我正在尝试使用Maven脚本创建一个包,当我部署它时,我收到以下错误

*BundleProvisioningResourceLocator->error: Unable to handle Bundle: [bundle-jar-file-name].jar. Bundle state: UPDATED
org.osgi.framework.BundleException: Unresolved constraint in bundle 4: package; (package=com.sun.org.apache.xerces.internal.parsers)
 at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3090)
 at org.apache.felix.framework.Felix.startBundle(Felix.java:1439)
 at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:774)
 at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:755)
 ......
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
 at javax.swing.AbstractButton.doClick(Unknown Source)
 at javax.swing.AbstractButton.doClick(Unknown Source)
 at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(Unknown Source)
 at javax.swing.SwingUtilities.notifyAction(Unknown Source)
 at javax.swing.JComponent.processKeyBinding(Unknown Source)
 at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
 at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
 at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
 at javax.swing.JMenuBar.processKeyBinding(Unknown Source)
 at javax.swing.KeyboardManager.fireBinding(Unknown Source)
 at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
 at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
 at javax.swing.JComponent.processKeyBindings(Unknown Source)
 at javax.swing.JComponent.processKeyEvent(Unknown Source)
 at java.awt.Component.processEvent(Unknown Source)
 at java.awt.Container.processEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
 at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
 at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
 at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
 at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Window.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.run(Unknown Source)*

我试图谷歌寻求解决方案但没有成功!

任何解决它的指针都会有所帮助。

1 个答案:

答案 0 :(得分:1)

  1. 检查您的捆绑包清单中的Import-Packages。您的包导入的包不会在OSGi框架中导出。

  2. 如果您想在捆绑中解析XML - 使用OSGi Compendium服务规范中的方法:702章:XML分析器规范。