Why a HAPI FHIR JPA server upgrade across several versions needs its own plan
A running 5.x or 6.x JPA server that has fallen several releases behind should be planned as a sequence of stages, not as one jump to the current release. HAPI FHIR publishes its upgrade path version by version, and each hop can carry its own schema migration, runtime requirement and breaking change. The current release referenced for planning is 8.8.2, released on 25 September 2026, so the distance between your server and that release is usually larger than a single version number suggests. Before you commit to any sequence, open the HAPI FHIR versions page and confirm, hop by hop, which intermediate releases are documented as upgrade targets. Do not assume a skip path exists because the code compiles on a newer release.
The first decision is the runtime. HAPI FHIR 8.2.0 requires JDK 17, so a server still running on Java 11 must change its JDK, its application server or container base image, and any libraries that do not yet run on 17 before the 8.2.0 step can happen. Record the JDK, Tomcat, Jetty or Wildfly versions, the Docker base image and the Spring Boot version your current deployment uses. Then list every custom interceptor, provider and partition interceptor in your build. Those classes are where a stage will most likely fail, because package and API changes between releases land in your code, not in the starter.
Schema is the second decision. Each stage runs database migrations through hapi-fhir-cli, and some stages add indexes or rewrite large tables, which can take far longer on a production-sized database than on a test instance. Plan a rehearsal on a restored copy of production for every stage, measure migration time, and record which stages require reindexing. Confirm each stage's migration notes and its database requirements in the release documentation before scheduling the window. Your rehearsal results, not general guidance, should set the maintenance window and the rollback point.
What changes between 5.x, 6.x and current HAPI FHIR releases
This table lists the breaking changes that most often stop a multi-version HAPI FHIR JPA upgrade, with the impact on each and the action to take first. Read it from the top down, because the Jakarta switch and schema changes in the middle of the path affect every later step. Each row links to the sibling topic that covers the change in detail.
| Change | Impact | Action needed |
|---|---|---|
| Jakarta switch from javax (6.x to 7.x) | Custom interceptors, providers and servlet filters that import javax packages will not compile or load against the newer release. | Inventory custom code, move imports to jakarta packages and test custom code before the upgrade. See HAPI FHIR 6.x to 7.x upgrade: the Jakarta switch. |
| meta.source and compartment changes (7.x to 8.0) | Legacy provenance data and Device resources in the Patient compartment change search and stored data behavior. | Review the legacy provenance table, check compartment-dependent queries and plan the reindex steps. See HAPI FHIR 7.x to 8.0 upgrade: meta.source and compartment changes. |
| JDK 17 requirement (8.2.0) | HAPI FHIR 8.2.0 requires JDK 17, so servers, containers and application server images still on Java 11 cannot run the release. | Confirm the JDK in every runtime, base image and application server before changing the HAPI FHIR version. See HAPI FHIR 8.2 upgrade: Java 17 and other breaking changes. |
| Unused SP_UPDATED column and contained resource IDs (8.2 changes) | Scripts or reports that read the removed column, or that depend on prior contained resource IDs, return errors or inconsistent results. | Search your queries and reports for the column and for contained resource references, then test them on a copy of the database. See HAPI FHIR 8.2 upgrade: Java 17 and other breaking changes. |
| Case-sensitive ID migration on SQL Server (8.8) | The migration can break zero-downtime upgrades on SQL Server, and affected databases need a maintenance window. | Determine whether your SQL Server data is affected, then plan the window and rehearse the migration. See HAPI FHIR 8.8 upgrade on SQL Server with case-sensitive IDs. |
| Partition API removals (8.10 to 8.12) | Custom partition interceptors that call removed default-partition methods will fail after the upgrade. | Replace the removed methods and test partitioned deployments before upgrading. See HAPI FHIR 8.10 to 8.12 upgrade: partition API removals. |
| Schema migrations across the full path | Each jump may run database migrations, some of which are heavyweight and can hold locks on large tables. | Back up the database, confirm dialect flags and plan migration order with hapi-fhir-cli. See Running HAPI FHIR database migrations with hapi-fhir-cli. |
| Java and Jakarta test coverage | Custom code that passes compile checks can still fail at runtime on a different application server or JDK. | Confirm the target JDK, server version and container image, then run integration tests against a copy of production data. |
Choosing the upgrade path from your starting version
A server on 5.x has the longest path to current releases, so it crosses the most schema migrations, reindex decisions and runtime changes. Treat each intermediate release as a separate stop with its own rehearsal.
- Longest hop list: expect several major releases between your version and the target, each with its own migration and reindex notes.
- javax still in place: custom interceptors, providers and interceptors built on javax packages must move to jakarta at the stop where the Jakarta switch lands.
- Java runtime: HAPI FHIR 8.2.0 requires JDK 17, so an application server or image that still runs an older Java version is a likely blocker.
- Database versions: confirm that your PostgreSQL or SQL Server version is supported at each stop, since migrations may assume newer features.
- Rehearsal per stop: restore a copy of production and run each migration in order, recording timings and any manual steps.
Before you estimate effort, confirm the exact hop list in the HAPI FHIR versions documentation and the release notes for each step.
A server on 6.x that still uses javax has a shorter path than a 5.x server, but the Jakarta switch is the stop that most often breaks custom code. Plan that stop around your own extensions, not only the framework upgrade.
- Jakarta package moves: every custom interceptor, provider and servlet filter that imports javax must be converted and retested before the move.
- Custom code inventory: list each class that extends or calls HAPI FHIR APIs, because some signatures change between releases.
- Later behavior changes: the 7.x to 8.0 stop changes provenance and compartment behavior, which can require reindexing and checks on existing data.
- Java and container images: confirm that the runtime, base image and Helm values match the JDK that the target release requires.
- Database indexes: some stops add PostgreSQL indexes, so allow time for index creation on large tables during the maintenance window.
Check the release notes for every stop between your version and the target, because the list of changed behaviors depends on the exact versions you pass through.
A server on 6.x that already runs on Jakarta has fewer code changes ahead, so the main risks move to behavior changes in later releases and to platform requirements. The work is mostly about data, partitions and runtime, not package names.
- Behavior changes: review the 7.x to 8.0 changes and any later stops for changes to stored metadata and compartment membership, then plan the reindex steps they require.
- Case-sensitive IDs on SQL Server: if you run SQL Server, the 8.8 migration can affect zero-downtime upgrades, so identify whether your data is affected before scheduling.
- Partition API removals: if you use custom partition interceptors, the 8.10 to 8.12 stop removes some default-partition methods that you must replace first.
- Target release: the current release, v8.8.2, was published on 25 September 2026, so confirm whether that or an earlier line fits your support plan.
- Runtime check: verify that your application server and images run the JDK that the target release needs.
Confirm each hop against the HAPI FHIR releases page before you fix the target version, since later releases may add stops that this list does not cover.
Preparing backups, inventory and a test environment before the first hop
Every hop in a multi-version jump changes the database, the runtime or both, so the work before the first migration decides how safely you can go back. These cards cover the backup, the inventory of custom code and runtimes, a production-sized rehearsal copy, and the migration tool checks that should pass before anyone runs a command against production.
Full database backup and restore test
Take a full backup of the HAPI FHIR database and restore it to a separate instance before touching the live server. A backup that has never been restored is an assumption, not a rollback plan. Confirm who owns the backup job, where copies are stored, how long they are kept, and how long a restore takes at your data volume, so the maintenance window is planned from a measured number rather than a guess. Note that the JPA server runs on PostgreSQL or Microsoft SQL Server in production, and the restore test should use the same engine and version.
JPA server docsCustom interceptors, providers and partitions
List every custom interceptor, resource provider, and partition interceptor in the deployment, with its source location and the HAPI FHIR classes it extends or calls. Each later hop can remove or change APIs these classes depend on, and partition interceptors are the most sensitive because they can rely on methods that change between releases. Record which code is owned by your team, which was copied from an example, and which has no tests. That list sets the review effort for each hop.
Partitioning docsApplication server and Java runtime inventory
Record how the server runs today: Docker image, Spring Boot application, WAR on Tomcat, Jetty or Wildfly, or a Helm release on Kubernetes. For each, note the Java runtime version, the container base image, and the servlet container version. Some later HAPI FHIR releases require JDK 17 (for example, 8.2.0), and a jump from older Java versions can also change how the application server loads packages. Confirm which JDK each environment runs before you choose a target release, and list any environment that is not under your team's direct control.
Versions pageProduction-sized database copy
Create a copy of production data that is large enough to show real migration time, index build time and disk growth. A small sample hides the slow steps. Run the migration rehearsal on this copy with the same database engine, configuration and resource limits as production, and record the duration of each step. Confirm how the copy is handled under your data protection rules, since it holds the same patient data as production and needs the same access controls, unless you have a documented reason to mask it.
Migration lock and dialect checks
Before running migrate-database from hapi-fhir-cli, confirm there is no stuck migration lock from an earlier failed run, and that the dialect flag matches the production engine. Check the migration tool's own documentation for the flags and lock-clearing steps in your target version, because these change across releases. Also note that the JPA server starter does not support MySQL, so a MySQL dialect is never a valid target. Run these checks on the rehearsal copy first and save the output as part of the change record.
How the staged upgrade moves from copy to production
The path starts with an inventory of the running server, custom code and database, then a backup is taken before anything changes. Each hop is rehearsed on a copy of production, with the schema migration run first and the reindex after it, followed by functional and performance checks. A go or rollback decision sits at the end of every rehearsal: rollback returns the team to the backup point, and only a passing rehearsal moves to production cutover. The same loop repeats for each intermediate version, so a failure never leaves the team guessing which hop broke.
Each version hop is rehearsed on a production copy before cutover.
The upgrade sequence, hop by hop, with checks and rollback points
The sequence turns a multi-version jump into a series of single hops, each with a frozen baseline, a verified backup, a tested runtime and a recorded rollback point, so the team can stop or reverse at any step without guessing at the state of the database.
Freeze and document the current baseline
Record the running HAPI FHIR version, the JPA server starter or WAR build, the JDK and application server versions, the database engine and version, the FHIR versions in use, and every custom interceptor, provider and partition setting. Also capture resource counts and a sample of search results. Freeze configuration changes and deployments for the duration of the project. The step is done when the team has a written inventory that a second engineer can reproduce from the repository and the environment, and when the same inventory exists for the staging copy.
Back up the database and build artifacts
Take a full database backup and confirm it restores. Store the exact server build, image tags, configuration files and custom code in version control or an immutable artifact store. Restore the backup into an isolated environment and start the server against it to prove the backup is usable. The check is a successful restore plus a passing smoke test of read and search calls. Only this verified restore counts as the rollback point for the first hop.
Rehearse each hop on a copy of production
Restore a recent copy of production into a staging environment with the same database engine, dialect and partition mode. Run every hop there before touching production, starting from the oldest version in use and moving forward one major line at a time. Record run times, errors, locks and any migration that needs manual attention. The step closes when the rehearsal completes cleanly and the team agrees on the production runbook, including who approves each hop.
Move the runtime to the JDK each hop requires
For each target version, check the official version documentation for its minimum JDK and confirm the application server, container base image and build tooling support it. Update the runtime in staging first and run the server and its tests on it. Java 17 is the minimum for HAPI FHIR 8.2.0 according to the project's version documentation, so older runtimes must be moved before that hop. The check is a clean startup and a passing test suite on the new runtime.
Migrate custom code from javax to jakarta
Where custom interceptors, providers or servlet filters still import javax packages, move them to jakarta packages as described in the vendor's 6.x to 7.x guidance. Rebuild and retest custom code in isolation before combining it with the server. Verify against the target server version, because the namespace change affects every component on the classpath. The check is a successful compile and unit test run with no remaining javax imports from the server API.
Run migrate-database with documented flags
Run the schema migration with hapi-fhir-cli using the flags and dialect settings given in the documentation for that exact version. Review the list of heavyweight migrations and plan a maintenance window for any that rewrite large tables. Confirm the migration lock is free before starting and know how to clear a stuck lock if the vendor documents that procedure. The check is a completed migration with no errors in the log and the schema version reported by the tool matching the target.
Reindex, then run validation and search tests
Where the version notes require it, run the reindex steps and wait for completion. Then run a fixed suite of read, create, update, history, search and chained-search requests, plus any partition and validation checks you rely on. Compare results with the baseline captured in step one. Differences in resource counts, search results or validation outcomes must be explained before continuing. The check is a passing suite with documented, accepted differences.
Record a rollback point, then decide to proceed
Before each production hop, take a fresh backup, label it with the version pair, and record the artifact and configuration versions that would be restored. After the hop passes its checks, record the new baseline and the rollback procedure for that hop. Proceed to the next hop only when the team signs off on the results. If a hop fails, restore the labeled backup and the previous artifacts, then repeat the rehearsal before trying again.
How to test each hop and roll back when a migration fails
Each hop should pass the same test set before it reaches production, and the rollback plan should be written before the first migration runs. Start with FHIR conformance and search regression tests against the server after each hop: run the same search parameter queries, includes, reverse includes, paging and history calls you rely on, and compare result counts and resource shapes with the pre-hop baseline. Add a set of read and write round trips for each resource type your applications use, since 6.x to current releases changed storage and indexing behavior in ways that surface in search results, not in startup logs.
Next, test every custom interceptor, provider and partition interceptor against the new version's API. Compile against the target release, then run unit and integration tests that exercise each hook. Authorization and audit checks are a separate pass: confirm that the AuthorizationInterceptor rules still deny what they should deny, that consent and search narrowing still apply, and that BALP audit records are still written with the fields your auditors expect. Load and reindex timing should come from a production-sized copy of the database, not a small test instance, because reindex duration and migration lock behavior depend on data volume. Record how long each step takes and confirm the maintenance window fits those numbers. Confirm with HAPI FHIR and your database vendor, for each hop, which migrations can be reversed and which cannot.
Rollback depends on what the hop changed. Restoring the pre-hop database backup, taken immediately before the migration and verified by a test restore, is the reliable option, and the application image or WAR must be pinned to the previous version so both sides match. Schema changes may not be reversible without that backup, because the migration can drop or rewrite columns, add indexes on large tables, or alter stored data that the older release cannot read. Keep the old and new application artifacts available, document who authorizes a restore, and rehearse the restore on the copy so the team has a timed procedure before production needs it.
What makes a multi-version HAPI FHIR upgrade longer or costlier
This table lists the drivers that lengthen or raise the cost of moving an old HAPI FHIR JPA server across several major versions, with why each adds work and how to keep it contained. Read each row against your own server, then use the drivers to scope the rehearsal and the maintenance window before asking for a quote.
| Driver | Why it adds work | How to reduce it |
|---|---|---|
| Number of hops | Each major version has its own schema migrations, Java requirements and breaking changes, so every skipped release is another set of steps to rehearse and verify. | Map the release sequence from your current version to the target before work starts, and confirm which intermediate versions must be run in order. |
| Custom code using javax packages | Custom interceptors, providers and partition code written against javax packages must move to jakarta packages, and each change needs compiling and testing against the new server. | Inventory custom code early, separate it from vendor libraries, and test it in a rehearsal environment at each stage. |
| Partitioning and custom partition interceptors | Partition-aware interceptors can depend on methods removed in later releases, and partitioned data needs checks beyond a standard upgrade test. | Confirm which partition features are enabled, list every custom partition interceptor, and test partitioned data separately from non-partitioned data. |
| Database size and reindex time | Larger tables take longer to migrate and reindex, and reindex work can dominate the maintenance window more than the schema change itself. | Ask for a measured reindex run on a copy of production, and plan the window from that measurement rather than from the schema migration alone. |
| SQL Server case-sensitivity exposure | Some 8.x migrations interact with case-sensitive IDs on SQL Server, which can block a zero-downtime path and require extra checks on existing data. | Check the collation and ID patterns in your database, and read the release notes for the affected version before choosing an upgrade approach. |
| Number of application environments | Development, test, staging and production each need the same stepwise upgrade, configuration checks and sign-off, multiplying effort. | Build one repeatable upgrade runbook and apply it in order to each environment, keeping production as the last step. |
| Availability requirement for maintenance windows | A strict uptime target limits how long migrations and reindexing can run, which may force a longer staged approach or a planned outage. | Agree the allowed outage with clinical and business owners early, then choose between an outage window and a staged approach based on rehearsal results. |
Questions teams ask before upgrading an old HAPI FHIR server
Can an old HAPI FHIR JPA server be upgraded in one jump?
Sometimes, but a jump across several major versions is rarely a single step in practice. Each major line can carry its own database schema migration, Java runtime requirement and behavior changes, so the path is usually planned as a sequence of stops that you verify in order. Start by reading the version notes for every release between your current version and your target, then check which of those notes change the database, the runtime or your custom code. The HAPI FHIR versions page is the place to confirm the Java requirement for each release line before you pick stops.
What drives the cost and effort of the upgrade?
The biggest drivers are how much custom code you run, how large the database is, and how many environments must be rehearsed. Custom interceptors, providers, partition logic and validation rules each need review against every API change between your version and the target. Database size affects how long migrations and reindexing take, and the number of stops in the path multiplies the testing. Ask any partner for a quote that lists the stops, the custom components in scope, the environments to be rehearsed, the sign-off steps and who performs each task. Confirm whether the quote covers only the upgrade or also ongoing support afterwards.
How long does a multi-version upgrade take, and what sets that time?
Duration depends on the number of version stops, the size of the database, the amount of custom code and how many rehearsal runs your change process requires. Heavy schema migrations and reindexing can run for a long time on large datasets, so you need a rehearsal on a copy of production to measure them before you set a window. Your own change calendar, staffing and testing capacity also shape the schedule. Ask for a timeline that breaks out each stop, each rehearsal and each go or no-go decision, and state which parts depend on your data volume and your environment.
What must our team provide before an upgrade starts?
Most delays come from missing inputs, so gather them before work begins. You will need an inventory of the running HAPI FHIR version, Java runtime, application server or container image, database engine and version, enabled modules, custom interceptors and providers, and external integrations. Database access for a copy of production, representative test data, and a named owner who can sign off each stop are also essential. Agree in writing who approves the rehearsal results and the production change, because those approvals gate the schedule.
Can our in-house team run this upgrade without a partner?
An in-house team can do it if it has people who know the JPA server, the database platform and the custom code, and if it has time to rehearse each stop. The work is less about running commands and more about tracing how each release changes schema, runtime and API behavior against your own deployment. Check whether your team has done a schema migration on the target database, can read the release notes for each stop, and can test custom code against new package names or APIs. If any of those gaps exist, a fixed-scope engagement can cover them, and you should compare that quote with the cost of staff time and delayed work.
How do we avoid downtime during the upgrade?
Downtime depends on whether a stop requires a long schema migration, a reindex or a lock on tables that the server uses. Some releases document steps that can run while the server is live, while others need a maintenance window, so check the notes for each stop before you plan. Rehearse the exact sequence on a copy of production, time each step, and record which operations block writes. Also confirm how load balancers, health checks and running instances behave during a migration, since a rolling change can fail if one node runs a different schema version. Plan the window around the slowest measured step.
What does a rollback plan look like for a database-backed FHIR server?
A rollback plan must cover both the application and the database, because a schema migration often cannot be reversed by redeploying an older image. Take a verified backup of the database immediately before each stop, keep the previous container image or WAR file, and record the exact configuration in use. Test the restore on a copy so you know how long it takes and that the data is intact. Define the criteria that trigger a rollback, who makes that call and how clients are told. Ask your team or partner to show the restore test and the decision record before the production change.
Does the upgrade change security and audit controls we rely on?
It can. HAPI FHIR does not provide one security layer; it offers building blocks such as the AuthorizationInterceptor, consent and search narrowing interceptors, and BALP audit logging, and each release may change how those interact with custom code. After any stop, re-test access rules, audit records and authentication paths against your documented requirements, not only the happy path. Confirm with your security and compliance owners which controls need evidence from before and after the upgrade, and keep that evidence with the change record.
How DeployOpen scopes and delivers a HAPI FHIR upgrade
DeployOpen plans and runs multi-version HAPI FHIR JPA server upgrades inside the client's own infrastructure, starting from a written scope that names each version step, schema migration and test. The work is rehearsed on a copy of production before any change reaches live data, and the client's team receives documentation and runbooks they can operate afterward.
How we scope
- Inventory the current HAPI FHIR version, JDK, application server, database engine and custom interceptors or providers.
- Map each intermediate version step, its schema migration and its breaking changes into a sequenced upgrade plan.
- Agree the written scope, deliverables and timeline with the client before any upgrade work starts.
How we build
- Rehearse each version step on a restored copy of production, including database migrations and reindexing runs.
- Port custom code from javax to jakarta packages and test it against each target release.
- Verify partitioning, authorization and audit configuration on the upgraded copy before cutover is scheduled.
How we hand over
- Deliver a runbook with backup steps, migration commands, rollback points and the order of reindex operations.
- Document every configuration change, custom code change and known behavior difference from the old version.
- Walk the client's platform and database teams through the cutover and the post-upgrade checks.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer for later HAPI FHIR releases.
- Re-test the upgraded server when the client changes its database, Java runtime or deployment platform.
- Confirm with the client's own change process and release calendar how each support window is handled.

