[
https://issues.apache.org/jira/browse/CAMEL-16059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273418#comment-17273418
]
Gianpaolo Lopresti commented on CAMEL-16059:
--------------------------------------------
Hi [~davsclaus],
thanks for you reply, i've tried to set the bean name like you did, i've also
put the property inside application.properties instead of application.yml, i've
put the Bean instantiation in the @SpringBootApplication class, but i still
have the issue:
application.properties:
camel.component.http.x509-hostname-verifier = #bean:myVerifier
main class:
@Bean(name = "myVerifier")
public HostnameVerifier myVerifier() {
return NoopHostnameVerifier.INSTANCE;
}
Error on startup:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'camel.component.http.x509-hostname-verifier'
to javax.net.ssl.HostnameVerifier:
Property: camel.component.http.x509-hostname-verifier
Value: #bean:myVerifier
Origin: class path resource [config/application.properties] - 1:47
Reason: No converter found capable of converting from type
[java.lang.String] to type [javax.net.ssl.HostnameVerifier]
Action:
Update your application's configuration
Process finished with exit code 1
I don't know if it's my fault, but the same configuration with Camel 3.2.0 and
Spring Boot 2.2.6.RELEASE works.
My pom starts with this:
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- Import dependency management from Camel - Spring Boot -->
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-dependencies</artifactId>
<version>${camel.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
where the camel version is 3.7.1 and spring boot version is 2.4.2 (that is the
one mentioned in the maven page of the camel 3.7.1 version).
Do you think that i'm doing something wrong?
Anyway thanks for all your support, if we can't figure out the problem and it
affects only me we can close the issue.
Thanks,
best regards.
> Cannot configure x509 host name verifier on camel http component
> ----------------------------------------------------------------
>
> Key: CAMEL-16059
> URL: https://issues.apache.org/jira/browse/CAMEL-16059
> Project: Camel
> Issue Type: Bug
> Components: camel-http
> Affects Versions: 3.7.0
> Reporter: Gianpaolo Lopresti
> Priority: Major
>
> Hi,
> When using camel-http-starter (with Spring boot), if you try to set the
> property (as per
> https://camel.apache.org/camel-spring-boot/latest/http-starter.html):
> camel.component.http.x509-hostname-verifier = NoopHostnameVerifier
> Camel crashes at start up with the message:
>
> Failed to bind properties under 'camel.component.http.x509-hostname-verifier'
> to javax.net.ssl.HostnameVerifier:
> Property: camel.component.http.x509-hostname-verifier
> Value: NoopHostnameVerifier
> Origin: class path resource [config/application.yml] - 71:31
> Reason: No converter found capable of converting from type
> [java.lang.String] to type [javax.net.ssl.HostnameVerifier]
>
> Thanks.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)