Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

ConverterNotFoundException: -Dserver.port=80-noverify No converter found ... String to Integer

Ask Question

but I get the following exception "No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]" .

Running with Spring Boot v1.5.4.RELEASE, Spring v4.3.9.RELEASE
2017-07-19 11:26:55.299 ERROR 5968 --- [           main] o.s.b.b.PropertiesConfigurationFactory   : Properties configuration failed validation
2017-07-19 11:26:55.299 ERROR 5968 --- [           main] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'server' on field 'port': rejected value [80-noverify]; codes [typeMismatch.server.port,typeMismatch.port,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.port,port]; arguments []; default message [port]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]]
Field error in object 'server' on field 'port': rejected value [80-noverify]; codes [typeMismatch.server.port,typeMismatch.port,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.port,port]; arguments []; default message [port]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]]
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target org.springframework.boot.autoconfigure.web.ServerProperties@caaddaea failed:
    Property: server.port
    Value: 80-noverify
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'port'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]
Action:
Update your application's configuration

If I use the property server.port in my application.yml it works, no problem.

What am I doing wrong? Thanks for any help.

can you also show the pom.xml? Looks like you're just missing a converter, are you excluding any dependencies that come with Spring Boot? – cahen Jul 19, 2017 at 9:49 @Ulug Toprak I added the application.yml / @cahen I am excluding something, but that is only spring-boot-starter-logging @Tanmay Delhikar thanks, that looks similar but a little different, I must read this slowly to understand. Only I don't use docker. – aliopi Jul 19, 2017 at 10:21 -noverify is a valid JVM option. You have probably set it somewhere and a space between parameters gets lost somehow. I don't use Eclipse so I can't check - can't you use the Valriables button to set a -D? – Assen Kolov Jul 19, 2017 at 12:27

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.