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

Error when uploading terminology in HAPI FHIR R4 server using hapi-fhir-cli tool #193

Open
azizul90 opened this issue Dec 22, 2020 · 6 comments

Comments

@azizul90
Copy link

Im recently has successfully set up a FHIR server deployed using docker image (hapiproject/hapi:latest). When Im trying to upload LOINC terminology into the server, I`m encounter the following error ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 : Unknown file: hapi-fhir-cli9140861092969243052.zip.

Below are complete log produced by hapi-fhir-cli tool.

[root@svr fhir-dataset]# ./hapi-fhir-cli upload-terminology -d loinc_2.69_PartFile_5.1.zip -d loinc_2.69_AnswerFile_2.69.zip -d loinc_2.69_MultiAxialHierarchy.zip -v r4 -t https://{domain-name}} -u http:https://loinc.org
------------------------------------------------------------
🔥  HAPI FHIR 5.2.0 - Command Line Tool
------------------------------------------------------------
Process ID                      : 30286@{server-hostname}
Max configured JVM memory (Xmx) : 6.9GB
Detected Java version           : 1.8.0_275
------------------------------------------------------------
2020-12-22 18:16:43.587 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: loinc_2.69_PartFile_5.1.zip
2020-12-22 18:16:43.812 [main] INFO  c.u.f.c.UploadTerminologyCommand File size is greater than 10 MB - Going to use a local file reference instead of a direct HTTP transfer. Note that this will only work when executing this command on the same server as the FHIR server itself.
2020-12-22 18:16:43.831 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: loinc_2.69_AnswerFile_2.69.zip
2020-12-22 18:16:43.844 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: loinc_2.69_MultiAxialHierarchy.zip
2020-12-22 18:16:43.875 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...
2020-12-22 18:16:45.535 [main] ERROR c.u.f.c.UploadTerminologyCommand Received the following response:
{
  "resourceType": "OperationOutcome",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http:https://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Unknown file: hapi-fhir-cli9140861092969243052.zip</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
  },
  "issue": [ {
    "severity": "error",
    "code": "processing",
    "diagnostics": "Unknown file: hapi-fhir-cli9140861092969243052.zip"
  } ]
}
2020-12-22 18:16:45.537 [main] ERROR ca.uhn.fhir.cli.App Error during execution:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 : Unknown file: hapi-fhir-cli9140861092969243052.zip
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:302)
        at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:351)
        at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:540)
        at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1314)
        at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:204)
        at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:113)
        at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:268)
        at ca.uhn.fhir.cli.App.main(App.java:43)
2020-12-22 18:16:45.538 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...
@citizenrich
Copy link

citizenrich commented Feb 10, 2021

I can reproduce this with SNOMED-CT on macOS with hapi-fhir-cli 5.2.0

Edit: Also confirmed with Ubuntu 20.04.

@azizul90
Copy link
Author

I can reproduce this with SNOMED-CT on macOS with hapi-fhir-cli 5.2.0

Edit: Also confirmed with Ubuntu 20.04.

I haven`t test with SNOMED-CT but I able to upload terminology with LOINC version 2.68 but not for version 2.69. Not sure if the current hapi-fhir-cli tool does not support latest version of LOINC.

@MacL3an
Copy link
Contributor

MacL3an commented Feb 22, 2022

I just ran into the same issue. Has anyone worked around it? Tried both LOINC and Snomed. It seems to work fine starting the server using the CLI, but not when starting it using this project.

@joeflack4
Copy link

This issue is also mirrored here, where I provide much more detail, including the cause in my case, being Docker issues. More info: hapifhir/hapi-fhir#3276

Another related issue: #322

Related; this is also about LOINC, but a different error: hapifhir/hapi-fhir#1629

Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open 730 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 4, 2024
@joeflack4
Copy link

Read down from here: hapifhir/hapi-fhir#3276 (comment)
In this other thread, the problem is described as seeming to have to do with a fixed file size limit, and someone suggests how to override that limit to fix the issue.

So I guess the issue is fixable, but at the very least, there should be a better error message for when this happens.

@github-actions github-actions bot removed the Stale label May 5, 2024
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

No branches or pull requests

4 participants