Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring startup issue - java.lang.IllegalArgumentException: Value must only contain valid chars

After adding Spring Cloud(Finchley.M8) dependency to Spring Boot(2.0.6.RELEASE) project, got an exception:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is java.lang.IllegalArgumentException: Value must only contain valid chars
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:583)
    ... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: Value must only contain valid chars
    at org.springframework.util.Assert.isTrue(Assert.java:116)
    at org.springframework.boot.actuate.endpoint.EndpointId.<init>(EndpointId.java:44)
    at org.springframework.boot.actuate.endpoint.EndpointId.of(EndpointId.java:102)
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer$EndpointBean.<init>(EndpointDiscoverer.java:471)
like image 671
Anton Arsentyev Avatar asked Jan 22 '26 09:01

Anton Arsentyev


1 Answers

I had same exception while starting springCloudConfigServer project.

Root cause was incorrect value for the below property in application.properties (Typo mistake)

Before: management.endpoints.web.exposure.include=bus=refresh

I changed it like below and my project started successfully management.endpoints.web.exposure.include=bus-refresh

like image 171
Murari Walake Avatar answered Jan 24 '26 01:01

Murari Walake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!