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

Anton Koscejev edited comment on CAMEL-12096 at 12/20/17 12:33 PM:
-------------------------------------------------------------------

Trying to set this field in Spring properties/yaml results in failure: 

{code}
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.springframework.context.ConfigurableApplicationContext]: 
Factory method 'service' threw exception; nested exception is 
org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: java.lang.IllegalArgumentException: Cannot configure option 
[hostNameResolver] with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
{code}


was (Author: koscejev):
Trying to setting this field in Spring properties/yaml results in failure: 

{code}
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.springframework.context.ConfigurableApplicationContext]: 
Factory method 'service' threw exception; nested exception is 
org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.apache.camel.spring.boot.CamelSpringBootInitializationException: 
org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.apache.camel.RuntimeCamelException: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'rest-configuration' defined in class path resource 
[org/apache/camel/model/rest/springboot/RestConfigurationDefinitionAutoConfiguration.class]:
 Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apache.camel.spi.RestConfiguration]: Factory method 
'configureRestConfigurationDefinition' threw exception; nested exception is 
java.lang.IllegalArgumentException: Cannot configure option [hostNameResolver] 
with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
Caused by: java.lang.IllegalArgumentException: Cannot configure option 
[hostNameResolver] with value [localHostName] as the bean class 
[org.apache.camel.spi.RestConfiguration] has no suitable setter method, or not 
possible to lookup a bean with the id [localHostName] in Spring Boot registry
{code}

> RestConfiguration hostNameResolver property naming mismatch
> -----------------------------------------------------------
>
>                 Key: CAMEL-12096
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12096
>             Project: Camel
>          Issue Type: Bug
>          Components: rest
>    Affects Versions: 2.20.1
>            Reporter: Anton Koscejev
>            Priority: Trivial
>
> Field name {{RestConfigurationDefinitionProperties#hostNameResolver}} doesn't 
> match {{RestConfiguration#restHostNameResolver}}, but the match is critical 
> for {{configureRestConfigurationDefinition()}} to work. In fact some other 
> fields (such as {{enableCors}}) also don't match, but they are set 
> explicitly, not in bulk via {{CamelPropertiesHelper.setCamelProperties}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to