I'm playing with implementation guides on the HAPI FHIR Starter server. I did not change anything in the server files but these lines in application.yaml :
If I start the server the first time, there is no problem. It downloads resources and I can reach it on localhost:8080.
java.lang.RuntimeException: org.springframework.context.ApplicationContextException: Unable to start web server;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with
name 'hapiServletRegistration' defined in ca.uhn.fhir.jpa.starter.Application: Unsatisfied dependency expressed
through method 'hapiServletRegistration' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'restfulServer' defined in class path resource [ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.class]:
Unsatisfied dependency expressed through method 'restfulServer' parameter 24; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'repositoryValidatingInterceptor' defined in class path resource [ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor]:
Factory method 'repositoryValidatingInterceptor' threw exception; nested exception is java.lang.NullPointerException:
Cannot invoke "java.lang.Integer.intValue()" because the return value of "ca.uhn.fhir.rest.api.server.IBundleProvider.size()" is null
at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart (ServletContainerInitializersStarter.java:69)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:73)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext (ServletContextHandler.java:356)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp (WebAppContext.java:1449)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp (JettyWebAppContext.java:328)
at org.eclipse.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1414)
at org.eclipse.jetty.server.handler.ContextHandler.doStart (ContextHandler.java:916)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart (ServletContextHandler.java:288)
at org.eclipse.jetty.webapp.WebAppContext.doStart (WebAppContext.java:524)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart (JettyWebAppContext.java:397)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:73)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:97)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:73)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:97)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:73)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start (ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start (Server.java:423)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart (ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart (AbstractHandler.java:97)
at org.eclipse.jetty.server.Server.doStart (Server.java:387)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start (AbstractLifeCycle.java:73)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty (AbstractJettyMojo.java:449)
at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute (AbstractJettyMojo.java:310)
at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute (JettyRunMojo.java:150)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:298)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
It's reproducible: if I get the lastest version of the HAPI FHIR starter server and modify the application.yaml, I get this error after restarting.
Am I missing something? Could it be the implementation guide that could somehow break everyting?
Thank you