Skip to content

Failed to bind properties under 'server.tomcat.basedir' to java.io.File #12163

@asaarnak

Description

@asaarnak

When updated from RC1 to RC2.
And using server.tomcat.basedir=. or server.tomcat.basedir=./
Then app failed to start with an error:

2018-02-21 20:58:48,172 [] [] [] [] [] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext: - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servletWebServerFactoryCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.class]: Unsatisfied dependency expressed through method 'servletWebServerFactoryCustomizer' parameter 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'server-org.springframework.boot.autoconfigure.web.ServerProperties': Could not bind properties to 'ServerProperties' : prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server.tomcat.basedir' to java.io.File

These work and are ok for me:
server.tomcat.basedir=../myTomcatDir
or full path
server.tomcat.basedir=/myTomcatDir

@philwebb
Maybe this is related to this commit ?
20109e2

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions