Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in RestfulServerUtils on dehydrated externalized binaries. #4757

Closed
tadgh opened this issue Apr 20, 2023 · 0 comments · Fixed by #4759
Closed

NPE in RestfulServerUtils on dehydrated externalized binaries. #4757

tadgh opened this issue Apr 20, 2023 · 0 comments · Fixed by #4759

Comments

@tadgh
Copy link
Collaborator

tadgh commented Apr 20, 2023

  1. Setup externalized binaries
  2. Create a Binary resource which becomes externalized.
  3. Attempt to perform a GET on that binary, without specifying a content-type.
2023-04-20 13:20:01.113 [fhir_endpoint.fhirEndpointServer-243] ERROR M:fhir_endpoint R:7ALTlIG4SfglfG3W c.u.f.r.s.i.ExceptionHandlingInterceptor - Failure during REST processing: java.lang.NullPointerException: Cannot read the array length because the return value of "org.hl7.fhir.instance.model.api.IBaseBinary.getContent()" is null
java.lang.NullPointerException: Cannot read the array length because the return value of "org.hl7.fhir.instance.model.api.IBaseBinary.getContent()" is null
	at ca.uhn.fhir.rest.server.RestfulServerUtils.streamResponseAsResource(RestfulServerUtils.java:964)
	at ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding.invokeServer(BaseResourceReturningMethodBinding.java:449)
	at ca.uhn.fhir.rest.server.RestfulServer.handleRequest(RestfulServer.java:1171)
	at ca.uhn.fhir.rest.server.RestfulServer.doGet(RestfulServer.java:417)
	at ca.uhn.fhir.rest.server.RestfulServer.service(RestfulServer.java:1870)
	at ca.cdr.endpoint.fhir.web.BaseFhirEndpointServlet.service(BaseFhirEndpointServlet.java:677)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
	at ca.cdr.api.web.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:72) [2 skipped]
	at ca.cdr.api.web.BlockVerbsFilter.doFilter(BlockVerbsFilter.java:51) [2 skipped]
	at ca.cdr.api.web.JettyHealthCheckFilterHttpResponses.doFilter(JettyHealthCheckFilterHttpResponses.java:94) [50 skipped]
	at ca.cdr.endpoint.fhir.web.FhirEndpointElasticApmFilter.doFilter(FhirEndpointElasticApmFilter.java:60) [2 skipped]
	at ca.cdr.endpoint.fhir.web.FhirEndpointErrorTrapFilter.doFilter(FhirEndpointErrorTrapFilter.java:44) [2 skipped]
	at ca.cdr.api.web.ExceptionLoggerFilter.doFilter(ExceptionLoggerFilter.java:47) [2 skipped]
	at ca.cdr.api.web.DefaultResourcesFilter.doFilter(DefaultResourcesFilter.java:56) [2 skipped]
	at ca.cdr.api.security.SaveModuleInRequestFilter.doFilter(SaveModuleInRequestFilter.java:73) [2 skipped]
	at ca.cdr.api.web.IgnoreInvalidAuthorizationHeaderFilter.doFilter(IgnoreInvalidAuthorizationHeaderFilter.java:50) [2 skipped]
	at ca.cdr.api.web.ClearSecurityFilter.doFilter(ClearSecurityFilter.java:22) [2 skipped]
	at ca.cdr.api.web.HttpTroubleshootingLogFilter.doFilter(HttpTroubleshootingLogFilter.java:72) [2 skipped]
	at ca.cdr.tracing.RequestTracingFilter.doFilter(RequestTracingFilter.java:38) [2 skipped]
	at ca.cdr.api.web.BaseJettyServer$1.runJob(BaseJettyServer.java:419) [25 skipped]
	at java.base/java.lang.Thread.run(Thread.java:833) [1 skipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant