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

FHIR Pacage Cache is case-sensitive #2682

me-d4l opened this issue May 27, 2021 · 1 comment

FHIR Pacage Cache is case-sensitive #2682

me-d4l opened this issue May 27, 2021 · 1 comment


Copy link

me-d4l commented May 27, 2021

Describe the bug

As discussed in org.hl7.fhir.core issues #475, the FHIR validator was until recently treating package IDs as case-sensitive, leading to problems when packages declared dependencies with another capitalization. The proposed solutions is to always treat the IDs as lowercase (ignore casing). However, when a package is added to the JpaPackageCache, a case-sensitive package ID check is performed, leading to the issue described in the linked issues. Specifically, the check is in the method JpaPackageCache#addPackageToCache

To Reproduce
Steps to reproduce the behavior:

  1. Set up a HAPI JPA server using the JPA starter project
  2. Configure the server to load dependencies on start-up (as discussed in this Zulip thread
  3. Configure the server to load the de.gecco#1.0.3 FHIR package on start-up (in application.yaml)
  4. Start the server

The error occurs when loading one of the dependencies - log output will this:

2021-05-26 16:52:02.919 [main] INFO  c.u.f.jpa.packages.JpaPackageCache [] Parsing package .tar.gz (28612 bytes) from
2021-05-26 16:52:02.948 [main] ERROR o.a.c.c.C.[Tomcat].[localhost].[/] [] Servlet.init() for servlet [jpaRestfulServer] threw exception Package ID KBV.Basis doesn't match expected: kbv.basis
    at ca.uhn.fhir.jpa.packages.JpaPackageCache.addPackageToCache(
    at ca.uhn.fhir.jpa.packages.JpaPackageCache.loadPackage(
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.base/java.lang.reflect.Method.invoke(
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
    at com.sun.proxy.$Proxy213.loadPackage(Unknown Source)
    at ca.uhn.fhir.jpa.packages.PackageInstallerSvcImpl.fetchAndInstallDependencies(
    at ca.uhn.fhir.jpa.packages.PackageInstallerSvcImpl.fetchAndInstallDependencies(

Expected behavior
The package should load without issues, regardless of casing.

Environment (please complete the following information):

  • HAPI FHIR Versios: Latest build
  • OS: iOS
patrick-werner added a commit that referenced this issue May 29, 2021
Make package ID handling case-insensitive (#2682)
Copy link

patrick-werner commented May 29, 2021

fixed by #2683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants