Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

issues uploading SNOMED CT and LOINC terminologies

577 views
Skip to first unread message

rrha...@gmail.com

unread,
Jul 31, 2023, 5:17:44 AM7/31/23
to HAPI FHIR
I'm trying to load both of these terminologies on a newly deployed HAPI 6.6.0 server instance.  I've tried both with the client (6.6.0 and 6.6.2) 'upload-terminology' command and directly with the CodeSystem/$upload-external-code-system operation (using cUrl on localhost), and both methods are giving me (different) errors.  This is what I'm consistently getting with the client (both versions), with both SNOMED CT and LOINC (it's the same error): 

:~$ ./hapi-fhir-cli upload-terminology -d Loinc_2.73.zip -d loincupload.properties -v r4 -t "http://localhost:8080" -u "http://loinc.org"

------------------------------------------------------------

🔥  HAPI FHIR 6.6.2 - Command Line Tool

------------------------------------------------------------

Process ID                      : 1082399@zeus

Max configured JVM memory (Xmx) : 7.8GB

Detected Java version           : 17.0.7

------------------------------------------------------------

2023-07-31 04:49:22.29 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml

2023-07-31 04:49:23.50 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /data/home/rob/Loinc_2.73.zip

2023-07-31 04:49:23.50 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: Loinc_2.73.zip

2023-07-31 04:49:23.87 [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.

2023-07-31 04:49:24.27 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /data/home/rob/loincupload.properties

2023-07-31 04:49:24.27 [main] INFO  c.u.f.c.UploadTerminologyCommand Compressing and adding file: loincupload.properties

2023-07-31 04:49:24.27 [main] INFO  c.u.f.c.UploadTerminologyCommand Finished compressing loincupload.properties

2023-07-31 04:49:24.27 [main] INFO  c.u.f.c.UploadTerminologyCommand Compressed 176 Bytes bytes in 1 file(s) into 267 Bytes bytes

2023-07-31 04:49:24.28 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...

2023-07-31 04:49:24.36 [main] ERROR ca.uhn.fhir.cli.App Error during execution: 

ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: HTTP 404 

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)

at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:309)

at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:369)

at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:538)

at ca.uhn.fhir.rest.client.impl.GenericClient$FetchConformanceInternal.execute(GenericClient.java:830)

at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBase(RestfulClientFactory.java:320)

at ca.uhn.fhir.rest.client.impl.RestfulClientFactory.validateServerBaseIfConfiguredToDoSo(RestfulClientFactory.java:283)

at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:245)

at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:538)

at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1317)

at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:229)

at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:133)

at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:264)

at ca.uhn.fhir.cli.App.main(App.java:42)

2023-07-31 04:49:24.37 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...

With the $upload-external-code-system operation I'm using this POST command (I've tried that so far only with LOINC 2.74, not 2.73) and Parameters resource:

curl -T hapi_terminology_parameters_loinc_2.74.json -H "Content-Type: application/json" -X POST http://localhost:8080/fhir/CodeSystem/$upload-external-code-system

{

   "resourceType":"Parameters",

   "parameter":[

      {

         "name":"system",

         "valueUri":"http://loinc.org"

      },

      {

         "name":"file",

         "valueAttachment": {

            "contentType":"application/zip",

            "data":"...base64-encoded-data...",

            "url":"Loinc_2.74.zip"

         }

      }

   ]

}

And the error that I'm consistently getting is:

:~$ curl -T hapi_terminology_parameters_loinc_2.74.json -H "Content-Type: application/json" -X POST http://localhost:8080/fhir/CodeSystem/$upload-external-code-system

{

  "resourceType": "OperationOutcome",

  "issue": [ {

    "severity": "error",

    "code": "processing",

    "diagnostics": "HAPI-0450: Failed to parse request body as JSON resource. Error was: HAPI-1814: Incorrect resource type found, expected \"CodeSystem\" but found \"Parameters\""

  } ]

I haven't found a way to get the operation to expect a Parameters resource instance for the operation parameters, rather than an actual CodeSystem resource instance.  I have validated the payload as a valid Parameters resource instance, including the base64 encoded file data in the Attachment data type.

Any help with figuring this out and solving the issue(s) will be much appreciated!

Rob

Nguyễn Hải Phong

unread,
Jul 31, 2023, 5:34:32 AM7/31/23
to rrha...@gmail.com, HAPI FHIR
Hi,


As per my understanding, u shouldnt use HTTP Request since the file size is too large (more than 10Mb). 




--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/e0c1debc-381f-47eb-ba8e-03ba2a6cb6c7n%40googlegroups.com.


--
Thank you and best regards,

============================================================
Nguyễn Hải Phong - Mobile/Zalo: 09133.09033 - Skype: haiphong.nguyen

Nguyễn Hải Phong

unread,
Jul 31, 2023, 5:43:48 AM7/31/23
to rrha...@gmail.com, James Agnew, HAPI FHIR
Hi,

There might be some issues with new LOINC naming inside its package that make the operation not work; since the 2.73 version package content is different from the previous version's.

@James Agnew  Maybe a new update for this LOINC changes?

rrha...@gmail.com

unread,
Jul 31, 2023, 5:46:09 AM7/31/23
to HAPI FHIR
Yes, thanks.  That's exactly what I did, as I tried to describe in my post.  The hapi-fhir-cli client is what is giving the 'ResourceNotFoundException' error.  I tried the direct API call as an alternative to that, because the client was consistently erroring out, for no obvious reason related to anything that I have been doing as far as I could see (of course, I may be missing something).

Rob

Nguyễn Hải Phong

unread,
Jul 31, 2023, 5:49:54 AM7/31/23
to rrha...@gmail.com, HAPI FHIR
Hi,

Can you try the other version? Check it here: https://loinc.org/downloads/archive/ Maybe 2.72 one?

rrha...@gmail.com

unread,
Jul 31, 2023, 5:50:55 AM7/31/23
to HAPI FHIR
Yes, that certainly can happen (and I've definitely encountered that before).  That's why I went back and tried it with 2.73, rather than only with the latest 2.74.  The Smile CDR documentation says that both 2.72 and 2.73 have been tested and verified (and I'm pretty certain that applies equally to the "generic" HAPI, as well as to Smile).

Rob

rrha...@gmail.com

unread,
Jul 31, 2023, 6:02:06 AM7/31/23
to HAPI FHIR
I just tried it with 2.72, and I'm getting exactly the same error.

Rob

On Monday, July 31, 2023 at 4:49:54 AM UTC-5 haiphon...@gmail.com wrote:
Hi,

Can you try the other version? Check it here: https://loinc.org/downloads/archive/ Maybe 2.72 one?

On Mon, Jul 31, 2023 at 4:46 PM rrha...@gmail.com <rrha...@gmail.com> wrote:
Yes, thanks.  That's exactly what I did, as I tried to describe in my post.  The hapi-fhir-cli client is what is giving the 'ResourceNotFoundException' error.  I tried the direct API call as an alternative to that, because the client was consistently erroring out, for no obvious reason related to anything that I have been doing as far as I could see (of course, I may be missing something).

Rob

On Monday, July 31, 2023 at 4:34:32 AM UTC-5 haiphon...@gmail.com wrote:
Hi,


As per my understanding, u shouldnt use HTTP Request since the file size is too large (more than 10Mb). 




On Mon, Jul 31, 2023 at 4:17 PM rrha...@gmail.com <rrha...@gmail.com> wrote:
I'm trying to load both of these terminologies on a newly deployed HAPI 6.6.0 server instance.  I've tried both with the client (6.6.0 and 6.6.2) 'upload-terminology' command and directly with the CodeSystem/$upload-external-code-system operation (using cUrl on localhost), and both methods are giving me (different) errors.  This is what I'm consistently getting with the client (both versions), with both SNOMED CT and LOINC (it's the same error): 

[...]

Nguyễn Hải Phong

unread,
Jul 31, 2023, 6:07:51 AM7/31/23
to rrha...@gmail.com, HAPI FHIR
Hi,

You can check the version content (in attached image), they changed the package content from version 2.72 onward. So you may try with 2.71 or lower.
Sorry for the inconvenience.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
LOINC packages.png

rrha...@gmail.com

unread,
Jul 31, 2023, 6:46:49 AM7/31/23
to HAPI FHIR
Yes, I know that they did make some changes then - but I think that HAPI has already picked up and incorporated those changes.  2.71 is going back farther than will actually be useful.  But I may try it to see if it can further help isolate the problem.  I'm hoping that James Agnew will have some thoughts - and tell me what I'm missing! 

James Agnew

unread,
Aug 8, 2023, 1:31:55 PM8/8/23
to HAPI FHIR
Hi Rob,

Is it possible you just need to escape the $ in the URL? If you don't, your shell is probably treating that as a variable name and replacing it with nothing since that variable doesn't exist. Try adding a \ before the $.

Cheers,
James

James Agnew

unread,
Aug 8, 2023, 1:39:49 PM8/8/23
to HAPI FHIR
Oh, and I also note that your base URLs don't agree- you used http://localhost:8080 in the CLI command, but you have http://localhost:8080/fhir/ in the cUrl command. I'm assuming the latter is correct, which may explain why the CLI didn't work.

Cheers,
James

Robert Hausam

unread,
Aug 10, 2023, 1:30:03 PM8/10/23
to HAPI FHIR, James Agnew
Escaping '$' was the main key for moving forward on this.  It also took a somewhat surprising amount of time for me to get the details right for the input Parameters resource (including the quite large base64 encoded 'data' values).  But after working all of that out, I've been able to load both SNOMED CT (both International and US) and LOINC (2.72) via curl:

rob@zeus:~$ curl -T hapi_terminology_parameters_snomed_ct_int_20230731.json -H "Content-Type: application/fhir+json" -X POST http: //localhost:8080/fhir/CodeSystem/\$upload-external-code-system
{
"resourceType": "Parameters",
"parameter": [
{
"name": "success",
"valueBoolean": true
},
{
"name": "conceptCount",
"valueInteger": 362738
},
{
"name": "target",
"valueReference": {
"reference": "CodeSystem/11189"
}
}
]
}

rob@zeus:~$ curl -T hapi_terminology_parameters_loinc_2.72.json -H "Content-Type: application/fhir+json" -X POST http: //localhost:8080/fhir/CodeSystem/\$upload-external-code-system
{
"resourceType": "Parameters",
"parameter": [
{
"name": "success",
"valueBoolean": true
},
{
"name": "conceptCount",
"valueInteger": 232702
},
{
"name": "target",
"valueReference": {
"reference": "CodeSystem/loinc"
}
}
]
}

The latest 2.74 version of LOINC does not successfully upload at present, as the name of the MultiAxialHierarchy file has been changed to ComponentHierarchyBySystem in the new release, and the code isn't recognizing it:

rob@zeus:~$ curl -T hapi_terminology_parameters_loinc_2.74.json -H "Content-Type: application/fhir+json" -X POST "http://localhost:8080/fhir/CodeSystem/\$upload-external-code-system"{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "HAPI-0862: Could not find the following mandatory files in input: [AccessoryFiles/MultiAxialHierarchy/MultiAxialHierarchy.csv]"
}
]
}

Fixing that should be pretty easy, but the code should probably be modified so that it can handle both variations.

And finally, I have still had zero success with using the 'upload-terminology' command (even after correcting the server address):

rob@zeus:~$ ./hapi-fhir-cli upload-terminology -d SnomedCT_InternationalRF2_PRODUCTION_20230731T120000Z.zip -v r4 -t "http://localhost:8080/fhir" -u "http://snomed.info/sct"
------------------------------------------------------------
🔥  HAPI FHIR 6.6.0 - Command Line Tool
------------------------------------------------------------
Process ID                      : 2124752@zeus
Max configured JVM memory (Xmx) : 7.8GB
Detected Java version           : 17.0.7
------------------------------------------------------------
2023-08-10 13:15:26.67 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml
2023-08-10 13:15:28.80 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /data/home/rob/SnomedCT_InternationalRF2_PRODUCTION_20230731T120000Z.zip
2023-08-10 13:15:28.80 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: SnomedCT_InternationalRF2_PRODUCTION_20230731T120000Z.zip
2023-08-10 13:15:32.63 [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.
2023-08-10 13:15:36.55 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...
2023-08-10 13:15:37.40 [main] ERROR c.u.f.c.UploadTerminologyCommand Received the following response:
{
  "resourceType": "OperationOutcome",
  "issue": [ {
    "severity": "error",
    "code": "processing",
    "diagnostics": "HAPI-1141: Unknown file: hapi-fhir-cli16020114123940321072.zip"
  } ]
}
2023-08-10 13:15:37.41 [main] ERROR ca.uhn.fhir.cli.App Error during execution: 
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 : HAPI-1141: Unknown file: hapi-fhir-cli16020114123940321072.zip
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:309)
at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:369)
at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:538)
at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1317)
at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:229)
at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:133)
at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:264)
at ca.uhn.fhir.cli.App.main(App.java:42)
2023-08-10 13:15:37.42 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...

No matter which terminology or version I've tried it continually complains about 'Unknown file: hapi-fhir-cli16020114123940321072.zip' - and I have no idea what that is supposed to be or anything that could be done about it - other than fixing the code.  I am getting the same error with the slightly newer 6.6.2 CLI tool, as well.

Rob

Paul Jones

unread,
Aug 10, 2023, 1:48:37 PM8/10/23
to Robert Hausam, HAPI FHIR, James Agnew
Hi Rob,

Is your HAPI service running in a docker container?

Paul



--

Paul Jones

Senior Developer

About Objects

240-388-5113
paul....@aboutobjects.com

Robert Hausam

unread,
Aug 10, 2023, 2:39:10 PM8/10/23
to HAPI FHIR, Paul Jones, James Agnew
Hi, Paul.  The instance we have deployed at the moment is running in Tomcat on an Ubuntu 22.04 Linux VM.  Ultimately the intention is to deploy in Docker, but it's being run this way for now until we've determined all of the required configuration details.

Rob

Paul Jones

unread,
Aug 10, 2023, 3:02:37 PM8/10/23
to Robert Hausam, HAPI FHIR, James Agnew
is it co-located with the cli or in a diff vm?

Paul Jones

unread,
Aug 10, 2023, 3:35:28 PM8/10/23
to Robert Hausam, HAPI FHIR, James Agnew
the reason I am asking is that the cli creates a temp file (in this case, since it exceeds the 10MB threshold), and passes a reference to that temp file to the server (that must be able to reference it); if the server and cli share a common temp fs, it should work; otherwise, it will not

rrha...@gmail.com

unread,
Aug 10, 2023, 4:19:11 PM8/10/23
to HAPI FHIR
Right.  The cli client is being run directly on the server VM instance - which is why it's referencing the server as localhost.
Message has been deleted

Mohan

unread,
Nov 17, 2024, 5:09:24 AM11/17/24
to HAPI FHIR
Hi ,

Were you able to upload the terminology zip successfully?
I am unable to upload either Loinc_2.73.zip or the latest one Loinc_2.78.zip.
Below is my log. 

PS C:\dev> .\hapi-fhir-cli.cmd upload-terminology -d "C:\\dev\\Loinc_2.78.zip" -v r4 -t http://localhost:8080/fhir -u http://loinc.org
------------------------------------------------------------
?  HAPI FHIR 7.4.5 - Command Line Tool
------------------------------------------------------------
Process ID                      : 2040@dev-pc
Max configured JVM memory (Xmx) : 4.0GB
Detected Java version           : 21.0.4
------------------------------------------------------------
2024-11-17 16:45:37.80 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml
Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts
2024-11-17 16:45:38.86 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading C:\dev\Loinc_2.78.zip
2024-11-17 16:45:38.88 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: C:\\dev\\Loinc_2.78.zip
2024-11-17 16:45:39.02 [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.
2024-11-17 16:45:39.19 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...
2024-11-17 16:45:43.75 [main] ERROR c.u.f.c.UploadTerminologyCommand Received the following response:

{
  "resourceType": "OperationOutcome",
  "issue": [ {
    "severity": "error",
    "code": "processing",
    "diagnostics": "HAPI-0862: Could not find the following mandatory files in input: [AccessoryFiles/MultiAxialHierarchy/MultiAxialHierarchy.csv]"
  } ]
}
2024-11-17 16:45:43.75 [main] ERROR ca.uhn.fhir.cli.App Error during execution:
ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: HTTP 422 : HAPI-0862: Could not find the following mandatory files in input: [AccessoryFiles/MultiAxialHierarchy/MultiAxialHierarchy.csv]
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
        at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:317)
        at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:415)
        at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:585)
        at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1441)
        at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:255)
        at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:151)
        at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:272)
        at ca.uhn.fhir.cli.App.main(App.java:42)
2024-11-17 16:45:43.75 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...
PS C:\dev>


Interestingly, you were uploading hapi_terminology_parameters_loinc_2.72.json which is not available in official distribution.
Is it something you prepared locally?

Regards,
Mohan

Kevin Dougan

unread,
Nov 18, 2024, 8:22:25 AM11/18/24
to HAPI FHIR
A solution was documented in the following HAPI-FHIR Closed Issue:


Kevin

Sathish Kumar Venkataraman

unread,
Apr 11, 2025, 1:47:54 PMApr 11
to HAPI FHIR
Any luck with SNOMED (zip: 611MB, extracted <4GB)?   I am getting heap space error..  I have tried 8GB/12GB XMX, no help...

hapi-fhir-cli upload-terminology -d /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip -v r4 -t http://localhost:8080/fhir -u http://snomed.info/sct -s 12GB 

------------------------------------------------------------

🔥  HAPI FHIR 8.0.0 - Command Line Tool

------------------------------------------------------------

Process ID                      : 31...@MacBook-Pro.local

Max configured JVM memory (Xmx) : 8.0GB

Detected Java version           : 23.0.2

------------------------------------------------------------

2025-04-11 22:03:49.25 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml

Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts

2025-04-11 22:03:49.73 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip

2025-04-11 22:03:49.73 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip

2025-04-11 22:03:55.02 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...

2025-04-11 22:04:14.02 [main] ERROR c.u.f.c.UploadTerminologyCommand Received the following response:

{

  "resourceType": "OperationOutcome",

  "issue": [ {

    "severity": "error",

    "code": "processing",

    "diagnostics": "Java heap space"

  } ]

}

2025-04-11 22:04:14.02 [main] ERROR ca.uhn.fhir.cli.App Error during execution: 

ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HTTP 500 : Java heap space

at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:485)

at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:317)

at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:415)

at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:585)

at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1441)

at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:255)

at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:151)

at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:272)

at ca.uhn.fhir.cli.App.main(App.java:42)

2025-04-11 22:04:14.03 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...

Sathish Kumar Venkataraman

unread,
Apr 11, 2025, 1:47:54 PMApr 11
to HAPI FHIR
I am not able to upload recent Snomed data.  Anyone managed to do this? please advise...


hapi-fhir-cli upload-terminology -d /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip -v r4 -t http://localhost:8080/fhir -u http://snomed.info/sct -s 12GB 

------------------------------------------------------------

🔥  HAPI FHIR 8.0.0 - Command Line Tool

------------------------------------------------------------

Process ID                      : 31287

Max configured JVM memory (Xmx) : 8.0GB

Detected Java version           : 23.0.2

------------------------------------------------------------

2025-04-11 22:03:49.25 [main] INFO  c.u.f.c.LogbackUtil Logging configuration set from file /logback-cli-on.xml

Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts

2025-04-11 22:03:49.73 [main] INFO  c.u.f.c.UploadTerminologyCommand Reading /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip

2025-04-11 22:03:49.73 [main] INFO  c.u.f.c.UploadTerminologyCommand Adding ZIP file: /Users/satv/Downloads/SnomedCT_ManagedServiceUS_PRODUCTION_US1000124_20240301T120000Z.zip

2025-04-11 22:03:55.02 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...

2025-04-11 22:04:14.02 [main] ERROR c.u.f.c.UploadTerminologyCommand Received the following response:

{

  "resourceType": "OperationOutcome",

  "issue": [ {

    "severity": "error",

    "code": "processing",

    "diagnostics": "Java heap space"

  } ]

}

2025-04-11 22:04:14.02 [main] ERROR ca.uhn.fhir.cli.App Error during execution: 

ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HTTP 500 : Java heap space

at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:485)

at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:317)

at ca.uhn.fhir.rest.client.impl.BaseClient.invokeClient(BaseClient.java:415)

at ca.uhn.fhir.rest.client.impl.GenericClient$BaseClientExecutable.invoke(GenericClient.java:585)

at ca.uhn.fhir.rest.client.impl.GenericClient$OperationInternal.execute(GenericClient.java:1441)

at ca.uhn.fhir.cli.UploadTerminologyCommand.invokeOperation(UploadTerminologyCommand.java:255)

at ca.uhn.fhir.cli.UploadTerminologyCommand.run(UploadTerminologyCommand.java:151)

at ca.uhn.fhir.cli.BaseApp.run(BaseApp.java:272)

at ca.uhn.fhir.cli.App.main(App.java:42)

2025-04-11 22:04:14.03 [Thread-0] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...


On Monday, 18 November 2024 at 18:52:25 UTC+5:30 kevin....@smiledigitalhealth.com wrote:

Marcelo Romero-Cors

unread,
May 14, 2025, 4:11:21 AMMay 14
to HAPI FHIR
Hello,

I was able to upload SNOMED data by adding these VM options to my IntelliJ Application configuration:
-Xmx8192m -XX:+HeapDumpOnOutOfMemoryError

Like this image:

intellij.png

Tell me if this helps,

Marcelo


Reply all
Reply to author
Forward
0 new messages