Skip to content

Cache warming fails if too many sources #2007

@anton-abushkevich

Description

@anton-abushkevich

Cache warming stacktrace:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CDMResultsService' defined in file [/usr/local/tomcat/webapps/WebAPI/WEB-INF/classes/org/ohdsi/webapi/service/CDMResultsService.class]: Invocation of init method failed; nested exception is javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error
                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)
                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
                                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
                                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
                                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
                                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
                                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
                                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
                                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
                                at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123)
                                at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666)
                                at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353)
                                at org.springframework.boot.SpringApplication.run(SpringApplication.java:300)
                                at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
                                at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
                                at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
                                at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
                                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
                                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                                ... 10 more
                Caused by: javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error
                                at org.ohdsi.webapi.job.JobTemplate.launch(JobTemplate.java:60)
                                at org.ohdsi.webapi.service.JobService.runJob(JobService.java:229)
                                at org.ohdsi.webapi.service.JobService$$FastClassBySpringCGLIB$$4fc5dc62.invoke(<generated>)
                                at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
                                at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
                                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
                                at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
                                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
                                at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
                                at org.ohdsi.webapi.service.JobService$$EnhancerBySpringCGLIB$$30094edf.runJob(<generated>)
                                at org.ohdsi.webapi.service.CDMResultsService.createJob(CDMResultsService.java:514)
                                at org.ohdsi.webapi.service.CDMResultsService.createJob(CDMResultsService.java:490)
                                at org.ohdsi.webapi.service.CDMResultsService.warmCaches(CDMResultsService.java:446)
                                at org.ohdsi.webapi.service.CDMResultsService.warmCaches(CDMResultsService.java:151)
                                at org.ohdsi.webapi.service.CDMResultsService.afterPropertiesSet(CDMResultsService.java:139)
                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688)
                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626)
                                ... 29 more

It seems job name for the task exceeds 100 symbols if too many source keys are concatenated. Job name (in batch_job_instance) is varchar(100).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions