2016-09-08 30 views
0

Apache Camel DockerコンポーネントはOSGIでは動作しません。Apache Camel DockerコンポーネントをOSGiで動作させるには? (ジャージーはOSGiでは動作しません)

JerseyがOSGi環境で動作していないために発生したと思われる次のエラーメッセージが表示されます。 OSGi環境の外では正常に動作します。

java.lang.RuntimeException:

キーエラーメッセージはここにあるにjava.lang.ClassNotFoundException:プロバイダorg.glass fish.jersey.internal.RuntimeDelegateImplはインスタンス化できませんでした:java.lang.Il legalStateException:いいえ発電機が設けられていないと私はプログラムの開始時にこれを実行した場合に動作答えがある

java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider org.glass 
fish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.Il 
legalStateException: No generator was provided and there is no default generator 
registered 
     at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152 
) 
     at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) 

     at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95) 
     at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:106) 
     at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.ja 
va:81) 
     at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:297 
) 
     at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:76) 

     at com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl.init(DockerCmdEx 
ecFactoryImpl.java:114) 
     at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(
DockerClientImpl.java:60) 
     at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuil 
der.java:61) 
     at org.apache.camel.component.docker.DockerClientFactory.getDockerClient 
(DockerClientFactory.java:118) 
     at org.apache.camel.component.docker.producer.DockerProducer.process(Doc 
kerProducer.java:99) 
     at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncP 
rocessorBridge.process(AsyncProcessorConverterHelper.java:61) 
     at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:1 
45) 
     at org.apache.camel.management.InstrumentationProcessor.process(Instrume 
ntationProcessor.java:77) 
     at org.apache.camel.processor.interceptor.TraceInterceptor.process(Trace 
Interceptor.java:163) 
     at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE 
rrorHandler.java:468) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern 
alProcessor.java:197) 
     at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) 
     at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern 
alProcessor.java:197) 
     at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(Time 
rConsumer.java:192) 
     at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.ja 
va:76) 
     at java.util.TimerThread.mainLoop(Timer.java:555) 
     at java.util.TimerThread.run(Timer.java:505) 
Caused by: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.inter 
nal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateExcepti 
on: No generator was provided and there is no default generator registered 
     at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:122) 
     at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225) 
     at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135 
) 
     ... 24 more 
Caused by: java.lang.IllegalStateException: No generator was provided and there 
is no default generator registered 
     at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(S 
erviceLocatorFactoryImpl.java:308) 
     at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLo 
catorFactoryImpl.java:293) 
     at org.glassfish.jersey.internal.inject.Injections._createLocator(Inject 
ions.java:138) 
     at org.glassfish.jersey.internal.inject.Injections.createLocator(Injecti 
ons.java:109) 
     at org.glassfish.jersey.internal.RuntimeDelegateImpl.<init>(RuntimeDeleg 
ateImpl.java:63) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 

     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct 
orAccessorImpl.java:62) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC 
onstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
     at java.lang.Class.newInstance(Class.java:442) 
     at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118) 
     ... 26 more 
[Camel (camel-1) thread #0 - timer://fetch] WARN org.apache.camel.component.time 
r.TimerConsumer - Error processing exchange. Exchange[ID-orsa-52510-147330437161 
1-0-2]. Caused by: [java.lang.RuntimeException - java.lang.ClassNotFoundExceptio 
n: Provider org.glassfish.jersey.internal.RuntimeDelegateImpl could not be insta 
ntiated: java.lang.IllegalStateException: No generator was provided and there is 
no default generator registered] 
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider org.glass 
fish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.Il 
legalStateException: No generator was provided and there is no default generator 
registered 
     at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152 
) 
     at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) 

     at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95) 
     at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:106) 
     at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.ja 
va:81) 
     at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:297 
) 
     at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:76) 

     at com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl.init(DockerCmdEx 
ecFactoryImpl.java:114) 
     at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(
DockerClientImpl.java:60) 
     at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuil 
der.java:61) 
     at org.apache.camel.component.docker.DockerClientFactory.getDockerClient 
(DockerClientFactory.java:118) 
     at org.apache.camel.component.docker.producer.DockerProducer.process(Doc 
kerProducer.java:99) 
     at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncP 
rocessorBridge.process(AsyncProcessorConverterHelper.java:61) 
     at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:1 
45) 
     at org.apache.camel.management.InstrumentationProcessor.process(Instrume 
ntationProcessor.java:77) 
     at org.apache.camel.processor.interceptor.TraceInterceptor.process(Trace 
Interceptor.java:163) 
     at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE 
rrorHandler.java:468) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern 
alProcessor.java:197) 
     at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) 
     at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) 
     at org.apache.camel.processor.CamelInternalProcessor.process(CamelIntern 
alProcessor.java:197) 
     at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(Time 
rConsumer.java:192) 
     at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.ja 
va:76) 
     at java.util.TimerThread.mainLoop(Timer.java:555) 
     at java.util.TimerThread.run(Timer.java:505) 
Caused by: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.inter 
nal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateExcepti 
on: No generator was provided and there is no default generator registered 
     at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:122) 
     at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225) 
     at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135 
) 
     ... 24 more 
Caused by: java.lang.IllegalStateException: No generator was provided and there 
is no default generator registered 
     at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(S 
erviceLocatorFactoryImpl.java:308) 
     at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLo 
catorFactoryImpl.java:293) 
     at org.glassfish.jersey.internal.inject.Injections._createLocator(Inject 
ions.java:138) 
     at org.glassfish.jersey.internal.inject.Injections.createLocator(Injecti 
ons.java:109) 
     at org.glassfish.jersey.internal.RuntimeDelegateImpl.<init>(RuntimeDeleg 
ateImpl.java:63) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 

     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct 
orAccessorImpl.java:62) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC 
onstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
     at java.lang.Class.newInstance(Class.java:442) 
     at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:118) 
     ... 26 more 
Terminate batch job (Y/N)? ^C 

C:\home\projects\universe\browser\application\apps\JumpMicro\core> 
+0

https://issues.apache.org/jiraにバグリクエストを投稿する必要があります –

+0

私はバグリクエストを投稿する仕組みがとても複雑です。 – Phil

答えて

0

を登録されたデフォルト・ジェネレータ はありませんでした。

RuntimeDelegate.setInstance(new org.glassfish.jersey.server.internal.RuntimeDelegateImpl()) 

しかし、私はこれを行う必要があるとは思わない。

関連する問題