Defect #719
closedOn develop cannot create database
Added by Marek Klement about 7 years ago. Updated over 5 years ago.
100%
Description
When I drop schema of database and after that I need to run IDM, there is a problem of unexisting table of quartz.
Updated by Ondřej Kopr about 7 years ago
- Status changed from New to Needs feedback
- Assignee set to Marek Klement
Did you drop your schema correctly?
DROP SCHEMA public cascade;
https://proj.bcvsolutions.eu/ngidm/doku.php?id=help-vyvoj:table-system-users&s[]=drop&s[]=schema#drop_schematu
Updated by Jan Helbich about 7 years ago
- Category set to 20
- Assignee changed from Marek Klement to Ondřej Kopr
- Priority changed from Normal to High
- Target version set to Diamond (7.4.0)
Happens also on my machine. Master is doing just fine.
I deploy to Postgres db (docker, fresh container) and Tomcat 8.5.20 (docker, fresh container).
While I was helping Marek to get this up and running, we dropped the database schema and recreated it, tested other Tomcat versions (8.0.latest), tried to alter tomcat privileges to be absolutely permissive, nothing helped. Therefore I suspect there is a new critical bug in develop. This makes nightly builds pretty much useless -> I'm raising the priority of this task.
Updated by Ondřej Kopr about 7 years ago
- Status changed from Needs feedback to In Progress
Updated by Ondřej Kopr about 7 years ago
- Assignee changed from Ondřej Kopr to Radek Tomiška
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initAccScheduledTask': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager eu.bcvsolutions.idm.core.scheduler.config.AbstractScheduledTaskInitializer.schedulerService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerManager' defined in class path resource [eu/bcvsolutions/idm/core/scheduler/config/SchedulerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager]: Factory method 'schedulerManager' threw exception; nested exception is eu.bcvsolutions.idm.core.api.exception.CoreException at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1218) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:778) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760) at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:150) at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:130) at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:85) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5261) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager eu.bcvsolutions.idm.core.scheduler.config.AbstractScheduledTaskInitializer.schedulerService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerManager' defined in class path resource [eu/bcvsolutions/idm/core/scheduler/config/SchedulerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager]: Factory method 'schedulerManager' threw exception; nested exception is eu.bcvsolutions.idm.core.api.exception.CoreException at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ... 26 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerManager' defined in class path resource [eu/bcvsolutions/idm/core/scheduler/config/SchedulerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager]: Factory method 'schedulerManager' threw exception; nested exception is eu.bcvsolutions.idm.core.api.exception.CoreException at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1127) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1199) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1123) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1021) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ... 28 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.bcvsolutions.idm.core.scheduler.api.service.SchedulerManager]: Factory method 'schedulerManager' threw exception; nested exception is eu.bcvsolutions.idm.core.api.exception.CoreException at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 40 common frames omitted Caused by: eu.bcvsolutions.idm.core.api.exception.CoreException: null at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.getAllTasks(DefaultSchedulerManager.java:112) at eu.bcvsolutions.idm.core.scheduler.config.SchedulerConfig.schedulerManager(SchedulerConfig.java:86) at eu.bcvsolutions.idm.core.scheduler.config.SchedulerConfig$$EnhancerBySpringCGLIB$$cef53b79.CGLIB$schedulerManager$2(<generated>) at eu.bcvsolutions.idm.core.scheduler.config.SchedulerConfig$$EnhancerBySpringCGLIB$$cef53b79$$FastClassBySpringCGLIB$$9e8b2bcf.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) at eu.bcvsolutions.idm.core.scheduler.config.SchedulerConfig$$EnhancerBySpringCGLIB$$cef53b79.schedulerManager(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 41 common frames omitted Caused by: org.quartz.JobPersistenceException: Couldn't obtain job names: ERROR: relation "qrtz_job_details" does not exist Pozice: 33 at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1889) at org.quartz.impl.jdbcjobstore.JobStoreSupport$20.execute(JobStoreSupport.java:1877) at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3739) at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobKeys(JobStoreSupport.java:1874) at org.quartz.core.QuartzScheduler.getJobKeys(QuartzScheduler.java:1464) at org.quartz.impl.StdScheduler.getJobKeys(StdScheduler.java:470) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.getAllTasks(DefaultSchedulerManager.java:103) ... 52 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: relation "qrtz_job_details" does not exist Pozice: 33 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:119) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobsInGroup(StdJDBCDelegate.java:980) at org.quartz.impl.jdbcjobstore.JobStoreSupport.getJobNames(JobStoreSupport.java:1887) ... 59 common frames omitted
Updated by Ondřej Kopr about 7 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Radek Tomiška to Marek Klement
- % Done changed from 0 to 90
Wa are fixed start up dependency
commit: https://github.com/bcvsolutions/CzechIdMng/commit/cb5024f131de662177cd51f563c592c01760293b
Please Marek could you make a test? Thank you.
Updated by Marek Klement about 7 years ago
- Status changed from Needs feedback to Closed
- % Done changed from 90 to 100
It works, thanks!
Updated by Radek Tomiška over 5 years ago
- Tracker changed from Task to Defect
- Category changed from 20 to Infrastructure