EclipseでOSGiプロジェクトを実行しています。新しいメソッドをRESTチャンネル(JSONを生成するはずです)に追加した後、次のスタックトレースが得られ、バンドルorg.eclipse.jetty.osgi.bootを起動できないことが示唆されています。バンドルを起動するとエラーが発生するorg.eclipse.jetty.osgi.boot(EclipseのOSGi Framework)
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.eclipse.jetty.osgi.boot - BundleEvent STOPPING - org.eclipse.jetty.osgi.boot
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - Starting BlueprintContainer destruction process for bundle org.eclipse.jetty.osgi.boot/9.4.0.v20161208
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - Not a blueprint bundle or destruction of BlueprintContainer already finished for org.eclipse.jetty.osgi.boot/9.4.0.v20161208.
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - Starting BlueprintContainer destruction process for bundle org.eclipse.jetty.osgi.boot/9.4.0.v20161208
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - Not a blueprint bundle or destruction of BlueprintContainer already finished for org.eclipse.jetty.osgi.boot/9.4.0.v20161208.
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.eclipse.jetty.osgi.boot - BundleEvent STOPPED - org.eclipse.jetty.osgi.boot
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.eclipse.persistence.moxy - BundleEvent STARTING - org.eclipse.persistence.moxy
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - Scanning bundle org.eclipse.persistence.moxy/2.6.4.v20160829-44060b6 for blueprint application
[Framework Event Dispatcher: [email protected]f4] ERROR org.eclipse.jetty.osgi.boot - FrameworkEvent ERROR - org.eclipse.jetty.osgi.boot
org.osgi.framework.BundleException: Exception in org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.start() of bundle org.eclipse.jetty.osgi.boot.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.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.NullPointerException
at org.eclipse.jetty.osgi.boot.internal.serverfactory.DefaultJettyAtJettyHomeHelper.startJettyAtJettyHome(DefaultJettyAtJettyHomeHelper.java:134)
at org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.start(JettyBootstrapActivator.java:82)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
... 12 more
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.aries.blueprint.container.BlueprintExtender - No blueprint application found in bundle org.eclipse.persistence.moxy/2.6.4.v20160829-44060b6
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.eclipse.persistence.moxy - BundleEvent STARTED - org.eclipse.persistence.moxy
[Start Level: Equinox Container: 2f378d23-3439-4e9f-98a1-7d4720e478a8] DEBUG org.apache.felix.coordinator - BundleEvent STARTING - org.apache.felix.coordinator
GrepCodeは、コードを次のように私をリードしてい:
for (Bundle b : bundleContext.getBundles())
{
if (b.getState() == Bundle.UNINSTALLED)
continue;
if (b.getSymbolicName().equals(jettyHomeBundleSysProp))
{
jettyHomeBundle = b;
break;
}
}
をしてb
変数がnullになるようです。しかし、私はそれが私をさらに発展させる方法を見ません。
メソッドのアノテーションは非常に無実です:
:メソッドを追加した後、私はMOXYでClassNotFoundExceptionが持っているので、@POST()
@Path("update")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
しかし、私は、彼らとエラーの間の接続が表示されません
Caused by: java.lang.NoClassDefFoundError: javax/json/JsonException
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.getNewXMLReader(SAXUnmarshaller.java:209)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.getXMLReader(SAXUnmarshaller.java:197)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:452)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:400)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:741)
at org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:649)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:349)
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.readFrom(MOXyJsonProvider.java:668)
次に、コンフィグレーションを実行するためにorg.glassfish.javax.json:1.0.4
を追加しました。私はjetty initializerに問題があります。このエラーは、jsonバンドルと、最初の問題を引き起こしたRESTチャンネルのバンドルを削除した後でさえ、永続的です。
何が原因でエラーが発生する可能性がありますか?その原因は何ですか?
'.cache'ファイルと' server.product'ファイルを '.plugins'フォルダから削除しましたが、成功しませんでした。 – ELITE