OSGI无法找到restlet类

时间:2012-09-01 07:50:21

标签: eclipse jetty osgi restlet

嗨,所有 我刚刚遇到一个问题:OSGI无法启动它无法找到类:org / restlet / engine / adapter / HttpServerHelper 但我已经把它添加到任何地方(src,import-packes,插件),但仍然得到这个错误,任何人都可以帮助我?!感谢

  

!MESSAGE FrameworkEvent ERROR!STACK 0   org.osgi.framework.BundleException:激活器XXX.Activator for   捆绑XXXX无效   org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)     在   org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)     在   org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)     在   org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)     在   org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)     在   org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)     在   org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)     在   org.eclipse.osgi.framework.eventmgr.EventManager $ EventThread.run(EventManager.java:340)   引起:java.lang.NoClassDefFoundError:   org / restlet / engine / adapter / HttpServerHelper at   java.lang.ClassLoader.defineClass1(Native Method)at   java.lang.ClassLoader.defineClass(未知来源)at   org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)     在   org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)     在   org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)     在   org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)     在   org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassName(ClasspathManager.java:469)     在   org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:456)     在   org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)     在   org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)     在   org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)     在   org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)     在java.lang.ClassLoader.loadClass(未知来源)at   java.lang.Class.getDeclaredConstructors0(Native Method)at   java.lang.Class.privateGetDeclaredConstructors(未知来源)at   java.lang.Class.getConstructor0(未知来源)at   java.lang.Class.newInstance0(未知来源)at   java.lang.Class.newInstance(未知来源)at   org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)     ... 12更多引起:java.lang.ClassNotFoundException:   org.restlet.engine.adapter.HttpServerHelper at   org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)     在   org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)     at java.lang.ClassLoader.loadClass(Unknown Source)... 34 more

1 个答案:

答案 0 :(得分:0)

您的捆绑包可能不会导入包org.restlet.engine.adapter