HAPI FHIR Server Start Error

85 views
Skip to first unread message

anki...@gmail.com

unread,
Jun 27, 2020, 11:18:56 AM6/27/20
to HAPI FHIR
Hi All,

I was trying to start HAPI FHIR server on mac using below command:

hapi-fhir-cli run-server -v=r4

However, it throws following exception. Kindly help

Error:

2020-06-27 23:13:54.154 [main] INFO  c.u.f.c.RunServerCommand Preparing HAPI FHIR JPA server on port 8080

2020-06-27 23:13:54.623 [main] INFO  c.u.f.c.RunServerCommand Starting HAPI FHIR JPA server in R4 mode

2020-06-27 23:14:15.767 [main] WARN  o.s.w.c.s.AnnotationConfigWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mySearchCoordinatorSvc': Unsatisfied dependency expressed through field 'myRequestPartitionHelperService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestPartitionHelperService': Unsatisfied dependency expressed through field 'myPartitionSettings'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'ca.uhn.fhir.jpa.model.config.PartitionSettings' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

2020-06-27 23:14:15.933 [main] ERROR o.s.w.c.ContextLoader Context initialization failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mySearchCoordinatorSvc': Unsatisfied dependency expressed through field 'myRequestPartitionHelperService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestPartitionHelperService': Unsatisfied dependency expressed through field 'myPartitionSettings'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'ca.uhn.fhir.jpa.model.config.PartitionSettings' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116)

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)

at ca.uhn.fhir.cli.RunServerCommand$1.contextInitialized(RunServerCommand.java:174)

at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)

at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)

at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)

at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)

Patrick Werner

unread,
Jul 3, 2020, 8:53:35 AM7/3/20
to HAPI FHIR
i can reproduce the error with the current 5.0.0 cli. This seems to be fixed in the more recent versions 5.0.1 and 5.0.2.

could the cli in these 2 versions also be released please?

Patrick Werner

unread,
Jul 10, 2020, 8:56:38 AM7/10/20
to HAPI FHIR
Just checked with a self-compiled CLI Version of hapi 5.0.2, no success, same errors.

It seems hapi-cli run-server is broken since 5.0.0, 4.2.0 runs without an issue

anki...@gmail.com

unread,
Jul 10, 2020, 10:26:00 AM7/10/20
to HAPI FHIR
Thanks Patrick for checking this again. Much appreciated. 

I hope this will get resolve in later version.

Thanks
Ankita
Reply all
Reply to author
Forward
0 new messages