Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.0 GA (Kay)
Description
Sample code can be found here:
https://github.com/pivotal-Jammy-Louie/PCC-Pizza
When I start my application using JPA, configured with the @EnableContinuousQueries annotation, my app fails to start with Exceptions...
stack trace:
2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pizzaController' defined in file [/home/vcap/app/BOOT-INF/classes/io/pivotal/pccpizza/controller/PizzaController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pizzaService' defined in file [/home/vcap/app/BOOT-INF/classes/io/pivotal/pccpizza/service/PizzaService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pizzaRepository': Cannot create inner bean '(inner bean)#3697186' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3697186': Initialization of bean failed; nested exception is java.lang.NullPointerException 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1269) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1126) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:122) ~[spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M3.jar!/:2.0.0.M3] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at io.pivotal.pccpizza.PccPizzaApplication.main(PccPizzaApplication.java:11) [classes/:na] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [app/:na] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app/:na] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [app/:na] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [app/:na] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pizzaService' defined in file [/home/vcap/app/BOOT-INF/classes/io/pivotal/pccpizza/service/PizzaService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pizzaRepository': Cannot create inner bean '(inner bean)#3697186' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3697186': Initialization of bean failed; nested exception is java.lang.NullPointerException 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1269) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1126) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1133) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1060) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:809) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:715) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT ... 27 common frames omitted 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pizzaRepository': Cannot create inner bean '(inner bean)#3697186' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3697186': Initialization of bean failed; nested exception is java.lang.NullPointerException 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:327) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:131) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1607) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1133) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1060) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:809) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:715) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT ... 41 common frames omitted 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3697186': Initialization of bean failed; nested exception is java.lang.NullPointerException 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:591) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:312) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT ... 55 common frames omitted 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT Caused by: java.lang.NullPointerException: null 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.data.gemfire.config.annotation.ContinuousQueryConfiguration.lambda$isApplicationBean$0(ContinuousQueryConfiguration.java:147) ~[spring-data-gemfire-2.0.0.RELEASE.jar!/:2.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at java.util.Optional.filter(Optional.java:178) ~[na:1.8.0_131] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.data.gemfire.config.annotation.ContinuousQueryConfiguration.isApplicationBean(ContinuousQueryConfiguration.java:147) ~[spring-data-gemfire-2.0.0.RELEASE.jar!/:2.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.data.gemfire.config.annotation.ContinuousQueryConfiguration.access$000(ContinuousQueryConfiguration.java:70) ~[spring-data-gemfire-2.0.0.RELEASE.jar!/:2.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.data.gemfire.config.annotation.ContinuousQueryConfiguration$1.postProcessBeforeInitialization(ContinuousQueryConfiguration.java:121) ~[spring-data-gemfire-2.0.0.RELEASE.jar!/:2.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:423) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1696) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.0.RELEASE.jar!/:5.0.0.RELEASE] 2017-10-16T15:41:55.97-0400 [APP/PROC/WEB/0]OUT ... 57 common frames omitted 2017-10-16T15:41:56.08-0400 [APP/PROC/WEB/0]OUT Exit status 1 2017-10-16T15:41:56.08-0400 [CELL/0] OUT Exit status 0 2017-10-16T15:41:56.08-0400 [CELL/0] OUT Stopping instance 8e9877cc-bdb0-486a-64b6-c024 2017-10-16T15:41:56.08-0400 [CELL/0] OUT Destroying container 2017-10-16T15:41:56.10-0400 [API/0] OUT Process has crashed with type: "web" 2017-10-16T15:41:56.11-0400 [API/0] OUT App instance exited with guid f1ad1fa2-2e01-4461-be3d-d7e9e17bc07b payload: {"instance"=>"8e9877cc-bdb0-486a-64b6-c024", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>3, "crash_timestamp"=>1508182916049041208, "version"=>"879c94b0-7975-4125-91d1-7bf32a14b767"} 2017-10-16T15:41:57.48-0400 [CELL/0] OUT Successfully destroyed container