Philip Andrew commented on CAMEL-10304:

Hi Claus, my feeling is that the Camel Docker component is very out of date and 
not really usable in the OSGi environment. This is what I find.

Here are instructions on how to get Docker TLS working if its at all helpful


a) The demo as given in the documentation page does run, but does not work in a 
non-OSGi environment with the current docker server due to API changes, 
from("docker://events?host=").to("log:event") as the 
Docker API has changed and the result back from the docker server doesn't match 
the docker-java version. However it does connect to the docker server using TLS 
when I turn on the secure mode.

b) In the non-OSGi environment I must add RuntimeDelegate.setInstance(new 
org.glassfish.jersey.server.internal.RuntimeDelegateImpl()) but I don't know 
why, that's enough to get it to work.

c) In the OSGi environment down at the lower level this uses Jersey which gives 
the error as shown in this Stackoverflow 
I followed their instructions but still couldn't get it to work in OSGi. OSGi 
is confusing most of the time.

d) The docker-java dependency version is quite old. Is it docker-java version 
1.4.0? That was released 07-Jul-2015, now docker-java current version is 3.0.6.

> Apache Camel Docker component not working in OSGi environment
> -------------------------------------------------------------
>                 Key: CAMEL-10304
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10304
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-docker
>    Affects Versions: 2.17.3
>         Environment: Windows
>            Reporter: Philip Andrew
>            Priority: Minor
> I can not use camel-docker in the OSGi environment, exception is thrown.
> 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
> If I do the following workaround then it can work
> RuntimeDelegate.setInstance(new 
> org.glassfish.jersey.server.internal.RuntimeDelegateImpl())
> http://stackoverflow.com/questions/39382056/how-to-get-apache-camel-docker-component-to-work-in-osgi-or-jersey-does-not-wo

This message was sent by Atlassian JIRA

Reply via email to