アクティベーターが次のようになっている非常に単純なosgiバンドルを実行しています
public void start(BundleContext bundleContext) throws Exception {
JAXBContext con = JAXBContext.newInstance(Activator.class);
}
これは常に例外をスローします
org.osgi.framework.BundleException: Exception in com.test.bundle.Activator.start() of bundle com.test.bundle.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1177)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
at com.test.bundle.Activator.start(Activator.java:26)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 12 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 16 more
Javaバージョン「1.6.0_37」を実行しています。これらは私が実行しているバンドルです
id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.0.v20120529-1548
1 ACTIVE org.eclipse.core.runtime_3.8.0.v20120521-2346
2 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.7.0
3 RESOLVED com.test.bundle_1.0.0.201301181429
4 ACTIVE org.eclipse.equinox.common_3.6.100.v20120522-1841
5 ACTIVE org.eclipse.equinox.console_1.0.0.v20120522-1841
6 ACTIVE org.apache.felix.gogo.runtime_0.8.0.v201108120515
7 ACTIVE org.apache.felix.gogo.shell_0.8.0.v201110170705
8 ACTIVE org.apache.felix.gogo.command_0.8.0.v201108120515
9 ACTIVE org.eclipse.core.jobs_3.5.300.v20120622-204750
10 ACTIVE org.eclipse.equinox.registry_3.5.200.v20120522-1841
11 ACTIVE org.eclipse.equinox.preferences_3.5.0.v20120522-1841
12 ACTIVE org.eclipse.core.contenttype_3.4.200.v20120523-2004
13 ACTIVE org.eclipse.equinox.app_1.3.100.v20120522-1841
javax.xmlはjava1.6に同梱されていませんか?また、javax.xmlバンドルを追加しようとしましたが、問題は解決しませんでした。