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' defined in class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/HibernateException

Samebug tips4

Needs to add netty-transport-native-epoll with a OS classifier to the classpath, it's not included in netty-all

I had to build one fat jar that will include all dependencies from the other jars that i wanted to use.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web862

  • 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
  • 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
  • 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' defined in class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/HibernateException at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at com.alessa.hellospeech.HellospeechServiceApplication.main(HellospeechServiceApplication.java:12)[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' defined in class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/HibernateException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:199)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] ... 8 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties' defined in class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/HibernateException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:536)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1192)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.getCustomizers(EmbeddedServletContainerCustomizerBeanPostProcessor.java:77)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:67)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:54)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] ... 16 more Caused by: java.lang.NoClassDefFoundError: org/hibernate/HibernateException at java.lang.ClassLoader.defineClass1(Native Method)[na:1.8.0_77] at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[na:1.8.0_77] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)[na:1.8.0_77] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)[na:1.8.0_77] at java.net.URLClassLoader.access$100(URLClassLoader.java:73)[na:1.8.0_77] at java.net.URLClassLoader$1.run(URLClassLoader.java:368)[na:1.8.0_77] at java.net.URLClassLoader$1.run(URLClassLoader.java:362)[na:1.8.0_77] at java.security.AccessController.doPrivileged(Native Method)[na:1.8.0_77] at java.net.URLClassLoader.findClass(URLClassLoader.java:361)[na:1.8.0_77] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_77] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_77] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_77] at org.hibernate.jpa.HibernatePersistenceProvider$1.isLoadedWithoutReference(HibernatePersistenceProvider.java:171)[hibernate-entitymanager-5.0.9.Final.jar:5.0.9.Final] at javax.persistence.Persistence$1.isLoaded(Persistence.java:111)[hibernate-jpa-2.1-api-1.0.0.Final.jar:1.0.0.Final] at org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:46)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:128)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.resolver.CachingTraversableResolverForSingleValidation.isReachable(CachingTraversableResolverForSingleValidation.java:36)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1612)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1597)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:609)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:580)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:524)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:492)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:457)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:407)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:205)[hibernate-validator-5.2.4.Final.jar:5.2.4.Final] at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:93)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.validation.DataBinder.validate(DataBinder.java:852)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.boot.bind.PropertiesConfigurationFactory.validate(PropertiesConfigurationFactory.java:355)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:276)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:245)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:346)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:302)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE] ... 29 more Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException at java.net.URLClassLoader.findClass(URLClassLoader.java:381)[na:1.8.0_77] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_77] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_77] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_77] ... 65 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

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 3 weeks ago
    Unknown user
    Once, 3 weeks ago
    Unknown user
    Once, 3 weeks ago
    Unknown user
    Once, 3 weeks ago
    1587 more bugmates