I'm trying to deploy an spring-boot service using hapi-fhir-jpa
.
Currently, I'm getting:
Caused by: java.lang.NullPointerException: The validated object is null
at java.base/java.util.Objects.requireNonNull(Objects.java:347) ~[na:na]
at org.apache.commons.lang3.Validate.notNull(Validate.java:225) ~[commons-lang3-3.11.jar:3.11]
at org.apache.commons.lang3.Validate.notNull(Validate.java:207) ~[commons-lang3-3.11.jar:3.11]
at org.apache.commons.lang3.Validate.noNullElements(Validate.java:559) ~[commons-lang3-3.11.jar:3.11]
at ca.uhn.fhir.rest.server.RestfulServer.setResourceProviders(RestfulServer.java:809) ~[hapi-fhir-server-5.3.3.jar:na]
at ca.uhn.fhir.spring.boot.autoconfigure.FhirAutoConfiguration$FhirRestfulServerConfiguration.initialize(FhirAutoConfiguration.java:160) ~[hapi-fhir-spring-boot-autoconfigure-5.3.3.jar:na]
at ca.uhn.fhir.rest.server.RestfulServer.init(RestfulServer.java:1285) ~[hapi-fhir-server-5.3.3.jar:na]
at javax.servlet.GenericServlet.init(GenericServlet.java:158) ~[tomcat-embed-core-9.0.45.jar:4.0.FR]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134) ~[tomcat-embed-core-9.0.45.jar:9.0.45]
... 38 common frames omitted
My related hapi-fhir configuration is:
hapi:
fhir:
version: R4
supported_resource_types:
- Patient
- Observation
server:
path: /fhir/*
rest:
server-name: hapi-fhir-spring-boot-sample-server-jersey
server-version: 1.0.0
implementation-description: Spring Boot Jersey Server Sample
default-response-encoding: json
e-tag-support: enabled
default-pretty-print: true
validation:
enabled: true
request-only: true
My pom.xml
dependencies are:
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-spring-boot-starter</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jaxrsserver-base</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-api</artifactId>
<version>5.3.3</version>
</dependency>
In order to start my service I run mvn clean spring-boot:run
.
Any ideas?