[ 
https://issues.apache.org/jira/browse/CAMEL-10304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15503195#comment-15503195
 ] 

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

https://github.com/PhilAndrew/JumpMicro/blob/master/core/src/main/scala/jumpmicro/impl/util/docker/README.md

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, 
http://camel.apache.org/docker.html 
from("docker://events?host=192.168.59.103&port=2375").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 
http://stackoverflow.com/questions/25740556/error-while-using-jersey-client-in-osgi-no-generator-was-provided
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
(v6.3.4#6332)

Reply via email to