I run on Tomcat , NetBeans just downloaded, Java EE .
NetBeans: Deploying on Apache Tomcat 8.0.15.0 profile mode: false debug mode: false force redeploy: true Отмена развертывания... undeploy?path=/calories-tracker OK - Undeployed application at context path /calories-tracker Развертывание на месте на C:\JavaLesson\HelloSpring\target\calories-tracker deploy?config=file%3A%2FC%3A%2FUsers%2FTimur%2FAppData%2FLocal%2FTemp%2Fcontext6254289419016115778.xml&path=/calories-tracker FAIL - Deployed application at context path /calories-tracker but context failed to start Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.security.SecurityUserDetailsService calories.tracker.config.root.AppSecurityConfig.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appSecurityConfig': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.security.SecurityUserDetailsService calories.tracker.config.root.AppSecurityConfig.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.security.SecurityUserDetailsService calories.tracker.config.root.AppSecurityConfig.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private calories.tracker.app.dao.UserRepository calories.tracker.app.security.SecurityUserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined And in the end:
28-Oct-2015 21:54:45.196 SEVERE [http-nio-8084-exec-7] org.apache.catalina.core.StandardContext.startInternal Error listenerStart 28-Oct-2015 21:54:45.197 SEVERE [http-nio-8084-exec-7] org.apache.catalina.core.StandardContext.startInternal Context [/calories-tracker] startup failed due to previous errors Update
web.xml:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <welcome-file-list> <welcome-file>/resources/calories-tracker.html</welcome-file> </welcome-file-list> </web-app> But what was relative to it during the build?
Warning: selected if you want to make it a problem, it can be ignored (attribute is defined as 'true')
web.xml- Saidolim pm