Базовый HTTP Get с Apache Camel (http4) - PullRequest
0 голосов
/ 11 марта 2019

Мы не можем получить базовый HTTP GET для любого URL с Camel.Даже самый простой GET для localhost никогда не возвращает ответ.

from("timer://foo?period=5000")
    .to("http4://localhost:8888")
    .log("Never get here...");
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/ssl/SSLContexts
    at org.apache.camel.component.http4.HttpComponent.createConnectionRegistry(HttpComponent.java:379)
    at org.apache.camel.component.http4.HttpComponent.createConnectionManager(HttpComponent.java:346)
    at org.apache.camel.component.http4.HttpComponent.createEndpoint(HttpComponent.java:276)
    at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:126)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:706)
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122)
    at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
    at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
    at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:569)
    at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:530)
    at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:240)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1349)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:212)
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1140)
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3735)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3440)
    at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3248)
    at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3244)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3267)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3244)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3160)
    at marc.Main.main(Main.java:59)
Caused by: java.lang.ClassNotFoundException: org.apache.http.ssl.SSLContexts
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 26 more

Windows 10, JDK 1.8.Верблюд 2.23.1

716  [main] DEBUG org.apache.camel.impl.DefaultCamelContext  - timer://foo?period=5000 converted to endpoint: timer://foo?period=5000 by component: org.apache.camel.component.timer.TimerComponent@71809907
732  [main] DEBUG org.apache.camel.management.DefaultManagementAgent  - Registered MBean with ObjectName: org.apache.camel:context=camel-1,type=endpoints,name="timer://foo\?period=5000"
747  [main] DEBUG org.apache.camel.impl.DefaultCamelContext  - Using ComponentResolver: org.apache.camel.impl.DefaultComponentResolver@20deea7f to resolve component with name: http4
747  [main] DEBUG org.apache.camel.util.ResolverHelper  - Lookup Component with name http4 in registry. Found: null
747  [main] DEBUG org.apache.camel.util.ResolverHelper  - Lookup Component with name http4-component in registry. Found: null
747  [main] DEBUG org.apache.camel.impl.DefaultComponentResolver  - Found component: http4 via type: org.apache.camel.component.http4.HttpComponent via: META-INF/services/org/apache/camel/component/http4
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...