SSL and Security Handler configuration issues in jetty component.

Solution Verified - Updated -

Issue

  • How to configure SSL and securityHandler with blueprint ?
  • The route is just a pass through for web-services and it works with SSL and authentication as expected. We have a new project that uses Java DSL to define the route...
      public class DataSyncPartyWebserviceRoute extends RouteBuilder {

          public void configure() {

              from("jetty://https://localhost:9003/datasync/v2/DatasyncParty" + 
                          "?handlers=securityHandler")
              ...
          }
      }
  • BUT we get the attached error on deployment.
Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: securityHandler of type: java.lang.Object
        at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:159)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.util.EndpointHelper.resolveReferenceParameter(EndpointHelper.java:323)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.util.EndpointHelper.resolveReferenceParameter(EndpointHelper.java:305)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.util.EndpointHelper.resolveReferenceListParameter(EndpointHelper.java:351)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.impl.DefaultComponent.resolveAndRemoveReferenceListParameter(DefaultComponent.java:427)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.impl.DefaultComponent.resolveAndRemoveReferenceListParameter(DefaultComponent.java:400)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.component.jetty.JettyHttpComponent.createEndpoint(JettyHttpComponent.java:164)[238:org.apache.camel.camel-jetty-common:2.15.1.redhat-620133]
        at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:114)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:558)[198:org.apache.camel.camel-core:2.15.1.redhat-620133]
        ... 41 more
  • I have two questions
    • Why does this happen in Java DSL and not in a Spring XML.
    • How do I define the same SSL and securityHandler config in a Blueprint, as opposed to Spring XML.

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.