org.springframework.context.ApplicationContextException

Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'port[0]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Illegal attempt to get property 'port' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer


Solutions on the web880

Solution icon of github
via GitHub by wilkinsona
, 7 months ago
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of github
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of github
via GitHub by thashi
, 3 months ago
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of github
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of stackoverflow
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jettyEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of stackoverflow
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of stackoverflow
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of github
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of stackoverflow
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Solution icon of stackoverflow
Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot

Stack trace

  • org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'port[0]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Illegal attempt to get property 'port' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at sample.freemarker.SampleWebFreeMarkerApplication.main(SampleWebFreeMarkerApplication.java:26)[classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'port[0]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Illegal attempt to get property 'port' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:199)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] ... 8 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'port[0]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Illegal attempt to get property 'port' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:352)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:303)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1581)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:517)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1197)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.getCustomizers(EmbeddedServletContainerCustomizerBeanPostProcessor.java:77)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:67)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:54)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1581)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 16 more Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 'port[0]' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Illegal attempt to get property 'port' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:708)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:301)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:280)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanWrapper.setPropertyValue(RelaxedDataBinder.java:699)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:859)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.validation.DataBinder.doBind(DataBinder.java:755)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.validation.DataBinder.bind(DataBinder.java:740)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:285)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:256)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:347)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] ... 33 more Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'port' of bean class [org.springframework.boot.autoconfigure.web.ServerProperties]: Could not instantiate property type [java.lang.Integer] to auto-grow nested property path; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.beans.AbstractNestablePropertyAccessor.newValue(AbstractNestablePropertyAccessor.java:919)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.createDefaultPropertyValue(AbstractNestablePropertyAccessor.java:887)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.setDefaultValue(AbstractNestablePropertyAccessor.java:875)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.setDefaultValue(AbstractNestablePropertyAccessor.java:871)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:626)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 44 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Integer]: Is it an abstract class?; nested exception is java.lang.InstantiationException: java.lang.Integer at org.springframework.beans.BeanUtils.instantiate(BeanUtils.java:80)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] at org.springframework.beans.AbstractNestablePropertyAccessor.newValue(AbstractNestablePropertyAccessor.java:914)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 48 more Caused by: java.lang.InstantiationException: java.lang.Integer at java.lang.Class.newInstance(Class.java:427)[na:1.8.0_102] at org.springframework.beans.BeanUtils.instantiate(BeanUtils.java:77)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] ... 49 more Caused by: java.lang.NoSuchMethodException: java.lang.Integer.<init>() at java.lang.Class.getConstructor0(Class.java:3082)[na:1.8.0_102] at java.lang.Class.newInstance(Class.java:412)[na:1.8.0_102] ... 50 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

7 times, 1 month ago
5 times, 3 weeks ago
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
Once, 3 months ago
115 more bugmates