FHIR Chat · Upgrading from 4.1 HAPI JPA to 5.3 in Docker · hapi

Stream: hapi

Topic: Upgrading from 4.1 HAPI JPA to 5.3 in Docker


view this post on Zulip dsh (Apr 06 2021 at 19:09):

Hi we have HAPI v4.1 running in Docker on AWS Fargate (no shell access), so I am wondering what steps I need to take to upgrade to 5.3

view this post on Zulip dsh (Apr 06 2021 at 19:13):

From the documentation https://hapifhir.io/hapi-fhir/docs/server_jpa/upgrading.html running the hapi-fhir-cliwill not be possible (bcoz of Fargate) unless either I change the docker container start command or deploy the 5.x outside docker to access and run hapi-fhir-cli for data migration and then deploy the 5.x version in docker/fargate

view this post on Zulip dsh (Apr 06 2021 at 19:41):

any insight or verification of the steps will be mucho appreciated

view this post on Zulip dsh (Apr 06 2021 at 19:43):

Our database is 190GB so I am assuming its going to take some time to migrate all of that, but any ball park idea on how much time??

view this post on Zulip dsh (Apr 12 2021 at 21:07):

Where is docker image of HAPI v5.3 on dockerhub? I can see 5.4 release on docker but there is no corresponding hapi-fhir-cli for 5.4? So is hapiproject/hapi:v5.4.0 tagged mistakenly?

If I use hapi-fhir-cli of 5.3 on 5.4 will it cause problems?

view this post on Zulip dsh (Apr 12 2021 at 21:10):

@James Agnew any idea on the missing docker image for 5.3?

view this post on Zulip James Agnew (Apr 12 2021 at 21:37):

Unfortunately I'm not sure - I didn't set up the dockerhub integration and TBH I don't really understand how it works.

@Jens Villadsen @Sean McIlvenna any ideas?

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:50):

The CLI jar does not get bundle in the Docker image, so you will want to build a separate docker image with just the CLI put on it that you can run in interactive mode that has access to the database

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:50):

Really, the CLI's primary (sole?) purpose is to upgrade the database schema/data

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:50):

So, you could theoretically run the CLI on any VM or machine that has access to the database

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:51):

(it doesn't necessarily have to be run through docker)

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:52):

besides that, I don't think you would want to start the 5.2 docker service before upgrading the database schema with the CLI

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:52):

so, even if the CLI were packaged with the docker image that runs the HAPI service, you wouldn't want it to run right away...

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:53):

really, I think best to take down the docker stack, run the cli on a machine that has access to the database, and then start the new stack with 5.2

view this post on Zulip Sean McIlvenna (Apr 12 2021 at 21:53):

hope that helps and makes sense

view this post on Zulip dsh (Apr 12 2021 at 22:13):

@Sean McIlvenna thanks for the reply. So I am running cli from 5.3 right now, so I am assuming I will be on 5.3 database wise...but I am not sure if I can run HAPI 5.4 against schema of 5.3

view this post on Zulip dsh (Apr 12 2021 at 22:14):

on another note, the migrate I just started on a 2.7GB database has been running for over 30 min now and I don't know how long will it run

view this post on Zulip dsh (Apr 12 2021 at 22:15):

so based on 2.7GB migrate taking over 30 minutes I am assuming 190GB production database will take over 24 hours if not more :grimacing: :grimacing:

view this post on Zulip dsh (Apr 12 2021 at 22:19):

@Sean McIlvenna @Jens Villadsen where is the Dockerfile used to create the 5.4 image

perhaps I can use that to create an image for HAPI 5.3

view this post on Zulip dsh (Apr 12 2021 at 22:22):

Daya Sharma said:

Sean McIlvenna Jens Villadsen where is the Dockerfile used to create the 5.4 image

perhaps I can use that to create an image for HAPI 5.3

never mind I think I found it https://github.com/hms-dbmi/hapi-fhir-docker/blob/master/Dockerfile

view this post on Zulip dsh (Apr 12 2021 at 22:37):

Daya Sharma said:

so based on 2.7GB migrate taking over 30 minutes I am assuming 190GB production database will take over 24 hours if not more :grimacing: :grimacing:

This is the slowest migration I have ever seen ... its updating 10K rows in 10 min
2021-04-12 22:23:33.924 [worker--2] INFO c.u.f.j.m.t.BaseColumnCalculatorTask 5_0_0.20200501.3: Updated 10000 rows on HFJ_SPIDX_DATE in 00:10:22

view this post on Zulip dsh (Apr 12 2021 at 22:45):

Daya Sharma said:

Daya Sharma said:

Sean McIlvenna Jens Villadsen where is the Dockerfile used to create the 5.4 image

perhaps I can use that to create an image for HAPI 5.3

never mind I think I found it https://github.com/hms-dbmi/hapi-fhir-docker/blob/master/Dockerfile

hmm I was mistaken that Dockerfile is not the right one. @James Agnew could you please point me to someone who can share that Dockerfile source and someone who can comment on the slowness of the ./hapi-fhir-cli migrate-database as mentioned above ^^

view this post on Zulip dsh (Apr 12 2021 at 22:52):

Is this the one https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/Dockerfile ?

view this post on Zulip dsh (Apr 12 2021 at 23:27):

its now 2 hours and counting for 3GB database migration :worried:

view this post on Zulip dsh (Apr 12 2021 at 23:34):

ok it finally finished in 2 hours and 14 min, the most time taken by was by task c.u.f.j.m.t.BaseColumnCalculatorTask approx 2 hours

view this post on Zulip dsh (Apr 12 2021 at 23:56):

Further progress and hurdles...

Creating Docker image for 5.3 after unzipping source code from release tagged 5.3

[ec2-user@ip-xxxxxx hapi-fhir-jpaserver-starter-5.3.0]$ docker build -t hapi-fhir-jpaserver-start:5.3.0 .
Sending build context to Docker daemon  10.98MB
Step 1/11 : FROM maven:3.6.3-jdk-11-slim as build-hapi
 ---> 0627c0e38d77
Step 2/11 : WORKDIR /tmp/hapi-fhir-jpaserver-starter
 ---> Using cache
 ---> f70b7367b352
Step 3/11 : COPY pom.xml .
 ---> Using cache
 ---> 433846491b8e
Step 4/11 : RUN mvn -e -ntp dependency:go-offline
 ---> Running in cc1b3bd0e402
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] The project ca.uhn.hapi.fhir:hapi-fhir-jpaserver-starter:war:5.3.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO]
[INFO] ------------< ca.uhn.hapi.fhir:hapi-fhir-jpaserver-starter >------------
[INFO] Building HAPI FHIR JPA Server - Starter Project 5.3.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:go-offline (default-cli) @ hapi-fhir-jpaserver-starter ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23.450 s
[INFO] Finished at: 2021-04-13T00:07:24Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline (default-cli) on project hapi-fhir-jpaserver-starter: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots (https://oss.sonatype.org/content/repositories/snapshots/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline (default-cli) on project hapi-fhir-jpaserver-starter: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots (https://oss.sonatype.org/content/repositories/snapshots/)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots (https://oss.sonatype.org/content/repositories/snapshots/)
    at org.apache.maven.plugins.dependency.resolvers.GoOfflineMojo.doExecute (GoOfflineMojo.java:88)
    at org.apache.maven.plugins.dependency.AbstractDependencyMojo.execute (AbstractDependencyMojo.java:144)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.shared.transfer.dependencies.resolve.internal.Maven31DependencyResolverException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots (https://oss.sonatype.org/content/repositories/snapshots/)
    at org.apache.maven.shared.transfer.dependencies.resolve.internal.Maven31DependencyResolver.resolveDependencies (Maven31DependencyResolver.java:251)
    at org.apache.maven.shared.transfer.dependencies.resolve.internal.Maven31DependencyResolver.resolveDependencies (Maven31DependencyResolver.java:90)
    at org.apache.maven.shared.transfer.dependencies.resolve.internal.DefaultDependencyResolver.resolveDependencies (DefaultDependencyResolver.java:85)
    at org.apache.maven.plugins.dependency.resolvers.GoOfflineMojo.resolveDependableCoordinate (GoOfflineMojo.java:125)
    at org.apache.maven.plugins.dependency.resolvers.GoOfflineMojo.resolveDependencyArtifacts (GoOfflineMojo.java:112)
    at org.apache.maven.plugins.dependency.resolvers.GoOfflineMojo.doExecute (GoOfflineMojo.java:68)
    at org.apache.maven.plugins.dependency.AbstractDependencyMojo.execute (AbstractDependencyMojo.java:144)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)

Basically it boils down to **Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots (https://oss.sonatype.org/content/repositories/snapshots/)
**
Complete logs are here

Any idea what the problem might be? Is this the reason why 5.3 docker image was never released? If not then can someone please guide me how I can solve the above problem?

view this post on Zulip dsh (Apr 12 2021 at 23:58):

@Grahame Grieve any help here ^ is much appreciated

view this post on Zulip dsh (Apr 12 2021 at 23:58):

as I am not a Java guy

view this post on Zulip dsh (Apr 13 2021 at 00:16):

@Sean McIlvenna @James Agnew ^ any idea? seems this problem was also mentioned about 2 months ago here

view this post on Zulip dsh (Apr 13 2021 at 00:19):

on further digging I found this in Nexus https://i.imgur.com/VC5T2fm.png not sure if that's the jar dependency not found by maven ?

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:23):

@dsh The Dockerfile for that project is here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/Dockerfile

I have had similar problems building the 5.3 branch for a long time. I haven't tried in quite a while. I had hoped it would have been resolved by now, but it appears maybe not... Would have to lean on @James Agnew to address why dependency resolution is failing for the testpgae-overlay:5.3

My main idea for why the CLI would be running slowly is related to the location of the CLI compared to the database server... Maybe try running the CLI from a machine that is sitting very close to the DB, if it's not already? Otherwise, again, would have to defer to James.

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:32):

With that said.. I don't see a rel_5_3_0 branch, yet. But, master seems to indicate that it is 5.3.0. So I'm altering the CI build on Docker Hub to build the master branch as latest, which currently happens to be 5.3.0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:32):

Guessing James & company are getting ready to release 5.3.0 of the hapi-fhir-jpaserver-starter project and haven't yet wrapped it all up? which would explain why rel_5_3_0 doesn't exist yet?

view this post on Zulip dsh (Apr 13 2021 at 06:33):

@Sean McIlvenna I thought master branch was 5.4.0, no ?

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:34):

Not according to pom.xml here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/pom.xml

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:34):

    <parent>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir</artifactId>
        <!-- FIMXME KBD Change this to 5.3.0 BEFORE merging this code to master !  -->
        <version>5.3.0</version>
    </parent>

view this post on Zulip dsh (Apr 13 2021 at 06:35):

so then the docker tagging is wrong?

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:36):

Anyways... :latest is building now on docker hub. We'll see if it succeeds.
https://hub.docker.com/repository/registry-1.docker.io/hapiproject/hapi/builds/2fef2357-efaf-4777-86a7-d9fcae294ed2
But, I gotta go to bed for now. I'll check in on it in the AM.

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:36):

"the docker tag is wrong"...
not sure which one you're referring to

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:37):

I don't see 5.3.0 on https://hub.docker.com/repository/docker/hapiproject/hapi/tags?page=1&ordering=last_updated

view this post on Zulip dsh (Apr 13 2021 at 06:37):

this one https://hub.docker.com/layers/hapiproject/hapi/v5.4.0/images/sha256-c1aeaef66181769e8962cfd5d756c04664b653c2d1fcbf427407823cc9291267?context=explore

view this post on Zulip dsh (Apr 13 2021 at 06:37):

there should not be 5.4.0 on docker hub

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:37):

Oh, I see

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:38):

yah, I agree, it's weird

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:38):

another @James Agnew question

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:38):

I'm not sure why they created rel_5_4_0 without there being a rel_5_3_0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:38):

I suspect it may have been done in error

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:39):

but, maybe not... the pom.xml in rel_5_4_0 has:

    <parent>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir</artifactId>
        <!-- FIMXME KBD Change this to 5.3.0 BEFORE merging this code to master !  -->
        <version>5.4.0-PRE2-SNAPSHOT</version>
    </parent>

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:39):

So, that seems intentional

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:39):

So, I guess I just can't explain why there is rel_5_4_0 but no rel_5_3_0

view this post on Zulip dsh (Apr 13 2021 at 06:39):

so it seems 5.3.0 was skipped and that bring me to the question that if I should be using 5.4.0 then where is the corresponding hapi-fhir-cli of 5.4.0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:39):

yes

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:40):

agreed.. skipped, as far as I can tell

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:40):

according to the pom.xml, 5.4.0 is still PRE2-SNAPSHOT

view this post on Zulip dsh (Apr 13 2021 at 06:40):

but 5.4.0 is not production ready yet, and there is no 5.3.0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:40):

yah

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:40):

I think you need to get @James Agnew to tell you what happened to rel_5_3_0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:40):

as soon as it exists, the Docker Hub CI will build a tag for :v5.3.0

view this post on Zulip dsh (Apr 13 2021 at 06:41):

thanks @Sean McIlvenna

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:41):

np

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:41):

FYI, master just finished building as :latest

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:42):

so, you could play around with using that until you get answers from James

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:42):

if you wanted

view this post on Zulip dsh (Apr 13 2021 at 06:42):

thanks that helps

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:42):

the answer may be to just create a tag/branch of master as rel_5_3_0

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:42):

shrug

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 06:42):

anyways... really gotta go to bed. :) g'nite!

view this post on Zulip dsh (Apr 13 2021 at 06:43):

On another note if I wanted to inject my own source for Spring integration in 5.3.0 then should I just start that docker image ? if not then I need to resolve teh above mentioned maven errors

view this post on Zulip dsh (Apr 13 2021 at 06:43):

good night

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:17):

I have a hard time identifiying the problem here. Is there actually a problem?

view this post on Zulip dsh (Apr 13 2021 at 08:20):

Yes there are multiple problems

5.3.0 docker image was missing, seems like it was skipped by mistake instead it was tagged 5.4.0 caused confusion since 5.4.0 is not production ready.

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:21):

That indeed sounds like a problem, yes. Is that the only problem?

view this post on Zulip dsh (Apr 13 2021 at 08:21):

plus there are bunch of maven problems trying to compile source tagged 5.3.0
@Jens Villadsen ^

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:23):

But that maven resolution-thing was covered by https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/214

view this post on Zulip dsh (Apr 13 2021 at 08:23):

seems like the fix was after 5.3.0 source tag was created

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:35):

well .. we can retag the 5.3.0 ... - thats an option

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:35):

its just a tag

view this post on Zulip dsh (Apr 13 2021 at 08:37):

so u mean the current master is at 5.3.0 ? or you saying source tagged 5.3.0 will be built and docker image released

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:38):

that wasn't what I said. I said we can make a new git tag

view this post on Zulip dsh (Apr 13 2021 at 08:39):

ok. what about the 5.3.0 docker image will that be recreated too from source tag 5.3.0 ? or from master ?

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:40):

can't say ... I don't currenlt have the time to go into it ... check with @James Agnew or @Sean McIlvenna if they have the time to look into it.

view this post on Zulip Jens Villadsen (Apr 13 2021 at 08:53):

@James Agnew - I believe retagging 'authorization' would best be placed at you

view this post on Zulip dsh (Apr 13 2021 at 17:30):

Sean McIlvenna said:

Anyways... :latest is building now on docker hub. We'll see if it succeeds.
https://hub.docker.com/repository/registry-1.docker.io/hapiproject/hapi/builds/2fef2357-efaf-4777-86a7-d9fcae294ed2
But, I gotta go to bed for now. I'll check in on it in the AM.

@Sean McIlvenna is the latest docker image built off of https://github.com/hapifhir/hapi-fhir/releases/tag/v5.3.0 ?? or is it built off of master?

The reason I ask I am upgrading HAPI JPA Server Starter from 4.1 to 5.3 but when I run latest against DB migrated by 5.3.0 hapi-fhir-cli I get so many errors related DDL statements

2021-04-13 17:16:22.025 [main] WARN  o.h.t.s.i.ExceptionHandlerLoggedImpl [ExceptionHandlerLoggedImpl.java:27] GenerationTarget encountered exception accepting command : Error executing DDL "create sequence seq_blkexcol_pid start 1 increment 50" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence seq_blkexcol_pid start 1 increment 50" via JDBC Statement

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:36):

:latest -> master

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:38):

I defer to James for guidance on upgrades. I've never successfully upgraded my MySQL schemas using the CLI. I get similar errors to you.
One thought: you're jumping a number of versions/updates between 4.1 and 5.3... Consider running the CLI for 4.2, then 4.3, then 5.0, then 5.1, etc.

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:38):

until you get to the version you want

view this post on Zulip dsh (Apr 13 2021 at 17:38):

@Sean McIlvenna would someone be able to do a docker release of 5.3.0 from https://github.com/hapifhir/hapi-fhir/releases/tag/v5.3.0 ? just to avoid any problems

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:38):

sure I'll try to do that

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:38):

one sec

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:39):

I had been basing Docker tags on GitHub branches

view this post on Zulip dsh (Apr 13 2021 at 17:39):

Sean McIlvenna said:

I defer to James for guidance on upgrades. I've never successfully upgraded my MySQL schemas using the CLI. I get similar errors to you.
One thought: you're jumping a number of versions/updates between 4.1 and 5.3... Consider running the CLI for 4.2, then 4.3, then 5.0, then 5.1, etc.

You are right that I am jumping the versions but in my findings so far the CLI was smart to upgrade database schema from 4.1->4.2.... to 5.3, so all I had to do was run it once

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:39):

because that's how James&Company had been doing releases

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:41):

:v5.3.0 is building based on github tag v5.3.0 now

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 17:41):

https://hub.docker.com/repository/registry-1.docker.io/hapiproject/hapi/builds/f14236d8-9bca-47e1-b25a-3e3d980c6863

view this post on Zulip dsh (Apr 13 2021 at 17:45):

dsh said:

Sean McIlvenna said:

>

2021-04-13 17:16:22.025 [main] WARN o.h.t.s.i.ExceptionHandlerLoggedImpl [ExceptionHandlerLoggedImpl.java:27] GenerationTarget encountered exception accepting command : Error executing DDL "create sequence seq_blkexcol_pid start 1 increment 50" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence seq_blkexcol_pid start 1 increment 50" via JDBC Statement

````
Now I am getting these error related to log stream

2021-04-13 17:45:12.629 [main] ERROR c.u.f.jpa.searchparam.retry.Retrier [Retrier.java:79] Retry failure 15/60: org.springframework.orm.jpa.JpaSystemException: Unable to access lob stream; nested exception is org.hibernate.HibernateException: Unable to access lob stream

Any ideas on how to fix them?

view this post on Zulip dsh (Apr 13 2021 at 18:35):

Sean McIlvenna said:

https://hub.docker.com/repository/registry-1.docker.io/hapiproject/hapi/builds/f14236d8-9bca-47e1-b25a-3e3d980c6863

@Sean McIlvenna could you please check the status of that build as I don't see 5.3.0 in docker hub at all. I cannot access that build URL

view this post on Zulip dsh (Apr 13 2021 at 18:56):

@James Agnew could you please confirm if using docker latest is the right way to run JPA Starter 5.3.0 ??

view this post on Zulip dsh (Apr 13 2021 at 18:58):

@Jens Villadsen ^ please let me know if I am on the right track?

view this post on Zulip Jens Villadsen (Apr 13 2021 at 19:14):

@Sean McIlvenna latest is now 5.3.0

view this post on Zulip Jens Villadsen (Apr 13 2021 at 19:16):

@dsh next time the project is tagged, the GH action on https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/.github/workflows/build-images.yaml is automatically run

view this post on Zulip Jens Villadsen (Apr 13 2021 at 19:17):

Credit goes to https://github.com/chgl

view this post on Zulip Jens Villadsen (Apr 13 2021 at 19:17):

meaning that the push is done automatically

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 19:38):

@dsh that's because the v5.3.0 tag failed to build on docker hub:
Could not find artifact ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:jar:5.3.0 in oss-snapshots
Just the same as you and I both previously got

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 19:38):

Need @James Agnew or someone to push hapi-fhir-testpage-overlay:jar:5.3.0 to OSS

view this post on Zulip dsh (Apr 13 2021 at 19:46):

@Sean McIlvenna Thanks.

Assuming master branch maps to hapiproject/hapi:latest I am unable to run JPA server on it I get this error

2021-04-13 19:05:21.598 [main] ERROR c.u.f.jpa.searchparam.retry.Retrier [Retrier.java:79] Retry failure 5/60: org.springframework.orm.jpa.JpaSystemException: Unable to access lob stream; nested exception is org.hibernate.HibernateException: Unable to access lob stream

any idea if master branch for Docker is even usable at the moment?

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 19:47):

GIven that's an exception stemming from Hibernate, I suspect that has something to do with database connectivity?

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 19:47):

Just a guess, though

view this post on Zulip dsh (Apr 13 2021 at 19:55):

Sean McIlvenna said:

Need James Agnew or someone to push hapi-fhir-testpage-overlay:jar:5.3.0 to OSS

@James Agnew could you or someone please push hapi-fhir-testpage-overlay:jar:5.3.0 to OSS https://i.imgur.com/VC5T2fm.png

view this post on Zulip dsh (Apr 13 2021 at 20:50):

@Sean McIlvenna @James Agnew to circle back on this ^ issue I just found the workaround https://github.com/openmrs/openmrs-contrib-plm-fhir-server/commit/5cd3dfe1d281a058ab1af6b8db163cb9d3e776ca

Any idea why that PR has not been merged in the main branch ?

BTW the workaround works!!! :big_smile:

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 21:10):

Couldn't tell you, to be honest. I only occasionally contribute to this repository :) So, not sure what has or has not been approved from PRs.

view this post on Zulip Sean McIlvenna (Apr 13 2021 at 21:11):

About all I can do right now is tell you how the docker builds work and modify the CI builds for Docker Hub :/

view this post on Zulip dsh (Apr 13 2021 at 21:12):

@Sean McIlvenna I understand. And thanks for your help. Now that I am able to build the release for 5.3.0, could you help me with this server start error

2021-04-13 21:10:56.691 [main] ERROR c.u.f.jpa.searchparam.retry.Retrier [Retrier.java:79] Retry failure 5/60: org.springframework.orm.jpa.JpaSystemException: Unable to access lob stream; nested exception is org.hibernate.HibernateException: Unable to access lob stream

or pls let me know who can best help here

view this post on Zulip dsh (Apr 14 2021 at 07:43):

Finally I got past that error by running this PLSQL function on Large Objects in my Postgres 12.6 on AWS RDS

CREATE OR REPLACE FUNCTION public.grant_select_on_large_objects()
 RETURNS text
 LANGUAGE plpgsql
AS $function$

    DECLARE
        REC BIGINT;

    begin

        FOR REC in   SELECT OID FROM pg_catalog.pg_largeobject_metadata
        loop

            execute 'grant select on LARGE OBJECT ' || REC || ' to caringly_db_master';

--          select 'LOBID is ' || REC.oid;

        END LOOP;

        return 'DONE';
    END;
$function$
;

but now I am facing another issue ... details here https://gist.github.com/f0249e5ce6fb5c3e6c376e59454268a2

in short org.springframework.batch.core.JobParametersInvalidException: There must be a valid number for readChunkSize, which is at least 1. You must include [resourceTypes] as a Job Parameter

2021-04-14 07:28:34.139 [main] INFO  com.zaxxer.hikari.HikariDataSource [HikariDataSource.java:347] HikariPool-1 - Shutdown initiated...
2021-04-14 07:28:34.140 [main] INFO  com.zaxxer.hikari.pool.HikariPool [HikariPool.java:204] HikariPool-1 - Close initiated...
2021-04-14 07:28:34.159 [main] INFO  com.zaxxer.hikari.pool.HikariPool [HikariPool.java:238] HikariPool-1 - Closed.
2021-04-14 07:28:34.160 [main] INFO  com.zaxxer.hikari.HikariDataSource [HikariDataSource.java:349] HikariPool-1 - Shutdown completed.
14-Apr-2021 07:28:34.161 SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/usr/local/tomcat/webapps/ROOT.war]
    java.lang.IllegalStateException: Error starting child
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1848)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
        at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
        ... 37 more
    Caused by: java.lang.IllegalStateException: Failed to execute ApplicationRunner
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798)
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:785)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:333)
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:173)
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:153)
        at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:95)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletConta
inerInitializer.java:174)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        ... 38 more
    Caused by: org.springframework.batch.core.JobParametersInvalidException: There must be a valid number for readChunkSize, which is at least 1. You must include [resourceTypes] as a Job Parameter
        at ca.uhn.fhir.jpa.bulk.job.BulkExportJobParameterValidator.validate(BulkExportJobParameterValidator.java:92)
        at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:129)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
        at com.sun.proxy.$Proxy214.run(Unknown Source)
        at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.execute(JobLauncherApplicationRunner.java:199)
        at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.executeLocalJobs(JobLauncherApplicationRunner.java:173)
        at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.launchJobFromProperties(JobLauncherApplicationRunner.java:160)
        at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.run(JobLauncherApplicationRunner.java:155)
        at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.run(JobLauncherApplicationRunner.java:150)
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:795)
        ... 46 more
14-Apr-2021 07:28:34.167 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/ROOT.war] has finished in [35,076] ms
14-Apr-2021 07:28:34.177 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
14-Apr-2021 07:28:34.202 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [35209] milliseconds

view this post on Zulip dsh (Apr 14 2021 at 08:28):

Finally got the JPA server running but I don't see any of my previous data at all ... even though the CLI reported success :sad:

I wonder if starting server with hibernate.hbm2ddl.auto: create-drop caused the data to be wiped out ?

view this post on Zulip dsh (Apr 14 2021 at 15:17):

@James Agnew could you please help here ?

view this post on Zulip James Agnew (Apr 14 2021 at 16:20):

If you set the DDL mode to create-drop that does drop the data when the system shuts down. These values are itemized here: https://stackoverflow.com/questions/438146/what-are-the-possible-values-of-the-hibernate-hbm2ddl-auto-configuration-and-wha

view this post on Zulip dsh (Apr 14 2021 at 17:49):

Thanks @James Agnew changing the value to hibernate.hbm2ddl.auto: update helped and I was start JPA normally and see the data only if JDBC (postgresql) user is super user with DDL rights. However if the user is a regular user with DML rights then I get these kinds of errors

Hibernate: create sequence SEQ_VALUESET_PID start 1 increment 50
2021-04-14 17:45:12.719 [main] WARN  o.h.t.s.i.ExceptionHandlerLoggedImpl [ExceptionHandlerLoggedImpl.java:27] GenerationTarget encountered exception accepting command : Error executing DDL "create sequence SEQ_VALUESET_PID start 1 increment 50" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence SEQ_VALUESET_PID start 1 increment 50" via JDBC Statement
Caused by: org.postgresql.util.PSQLException: ERROR: permission denied for table hfj_resource
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:158)
    at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
    ... 111 common frames omitted
2021-04-14 17:48:26.025 [main] ERROR c.u.f.jpa.searchparam.retry.Retrier [Retrier.java:79] Retry failure 10/60: ca.uhn.fhir.rest.server.exceptions.InternalErrorException: could not extract ResultSet

view this post on Zulip dsh (Apr 15 2021 at 17:51):

Sean McIlvenna said:

Couldn't tell you, to be honest. I only occasionally contribute to this repository :) So, not sure what has or has not been approved from PRs.

@Sean McIlvenna I got past the error related to hapi-fhir-testpage-overlay:jar:5.3.0 not found by maven by including this in pom.xml

       <pluginManagement>
          <plugins>
              <!--
              There is a bug in 3.1.2 that prevents go-offline from working
              Reported here:
              https://issues.apache.org/jira/browse/MDEP-739
              -->
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <version>3.1.1</version>
              </plugin>
          </plugins>
      </pluginManagement>

So with the above change could you please do 5.3.0 docker release ?

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 18:05):

So, where is this change? I'm not seeing it in github anywhere...

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 18:06):

@dsh

view this post on Zulip dsh (Apr 15 2021 at 19:59):

here https://github.com/openmrs/openmrs-contrib-plm-fhir-server/commit/5cd3dfe1d281a058ab1af6b8db163cb9d3e776ca referred in this issue https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/214

view this post on Zulip dsh (Apr 15 2021 at 19:59):

@Sean McIlvenna

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:12):

so, that's in a different fork of hapi-fhir-jpaserer-starter

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:12):

docker hub is based on hapifhir/hapi-fhir-jpaserver-starter

view this post on Zulip dsh (Apr 15 2021 at 20:12):

but the fix was referenced in the issue #214

view this post on Zulip dsh (Apr 15 2021 at 20:13):

and the fix works

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:13):

it may be referenced in issue #214, but it's not incorporated in hapifhir/hapi-fhir-jpaserver-starter as far as I can tell

view this post on Zulip dsh (Apr 15 2021 at 20:13):

@Sean McIlvenna ^

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:13):

we need a commit on hapifhir/hapi-fhir-jpaserver-starter that applies a similar fix

view this post on Zulip dsh (Apr 15 2021 at 20:14):

so if I do a pull request will you be able to merge it ?

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:16):

I'm not sure where to merge it to

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:16):

master...

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:16):

a new rel_5_3_0 branch?

view this post on Zulip dsh (Apr 15 2021 at 20:16):

@Sean McIlvenna this was merged in master https://github.com/hapifhir/hapi-fhir-jpaserver-starter/commit/12c19eff576a8b93eb26f922d46d988377c22f80#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:17):

ah!

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:17):

ok... so, master = 5.3.0

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:17):

and works

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:17):

?

view this post on Zulip dsh (Apr 15 2021 at 20:17):

and I don't think master currently maps to 5.3.0

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:17):

hm

view this post on Zulip dsh (Apr 15 2021 at 20:17):

since 5.3.0 tag doesn't contain that fix

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:18):

I think probably need to remove the 5.3.0 tag and re-create it based on master now

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:18):

I'm going to do that, since v5.3.0 tag doesn't currently build anyways

view this post on Zulip dsh (Apr 15 2021 at 20:18):

@James Agnew is it safe to recreate 5.3.0 tag ?

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:18):

hopefully that is the right decision and @James Agnew doesn't get mad at me

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:18):

lol

view this post on Zulip dsh (Apr 15 2021 at 20:19):

@Sean McIlvenna I think master may be 5.4.0 snapshot

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:19):

not according to pom.xml in master

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:19):

pom.xml in master says 5.3.0

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:19):

    <parent>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir</artifactId>
        <!-- FIMXME KBD Change this to 5.3.0 BEFORE merging this code to master !  -->
        <version>5.3.0</version>
    </parent>

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:20):

https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/pom.xml#L18

view this post on Zulip dsh (Apr 15 2021 at 20:20):

on another front could you please help me with this problem in upgrade https://chat.fhir.org/#narrow/stream/179167-hapi/topic/Migrating.20existing.20resources.20to.20use.20Profiles/near/234743410

or point me to the right folks

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:21):

github tag v5.3.0 currently points to this commit: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/commit/46e0f8f37de97ed8823c5f7190218a3b2e66f165
I'm removing that tag, and re-creating it from master right now, which currently builds OK, includes the fix mentioned above, and points to HAPI core libraries v5.3.0

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:22):

done

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:23):

docker hub detected the tag change, and is re-building the docker image

view this post on Zulip dsh (Apr 15 2021 at 20:24):

dsh said:

on another front could you please help me with this problem in upgrade https://chat.fhir.org/#narrow/stream/179167-hapi/topic/Migrating.20existing.20resources.20to.20use.20Profiles/near/234743410

or point me to the right folks

@Sean McIlvenna any idea on how I can move forward on this last step in the upgrade process

view this post on Zulip Ian Bacher (Apr 15 2021 at 20:24):

Sean McIlvenna said:

we need a commit on hapifhir/hapi-fhir-jpaserver-starter that applies a similar fix

That's actually this commit, which should be present in 5.3.0 already.

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:26):

@Ian Bacher you are right... however, the tag for v5.3.0 was created before the commit

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:26):

so, building from the tag was still broken

view this post on Zulip Sean McIlvenna (Apr 15 2021 at 20:26):

that's why I had to move the tag

view this post on Zulip Ian Bacher (Apr 15 2021 at 20:27):

Oh, I see! I'm the maintainer of the fork... we've really just made a very small number of changes and use an GitHub bot to keep up-to-date, so I was surprised by the implication that there was a commit in our repo that wasn't in master.

view this post on Zulip Jame Dang (Apr 16 2021 at 07:38):

@James Agnew : I use R4 of the 5.4.0 Pre5 and I cannot find the ReferralRequest class, I think it is replaced by another class or it is not support by current version of HAPI, if it is not support by current HAPI version could you give me an advice what class can be used for keep Transfer Patient Information (maybe ServiceRequest)? Thanks for your support

view this post on Zulip Ian Bacher (Apr 16 2021 at 14:07):

@Jame Dang There's nothing HAPI-specific about it. In R4, ReferralRequest and ProcedureRequest were merged into ServiceRequest. Note that the usual way to store intra-facilitiy or intra-organisational transfers is to track it via the Encounter.

view this post on Zulip Jame Dang (Apr 16 2021 at 14:08):

Thanks @Ian Bacher : I'm using ServiceRequest now, thank you for your confirmation

view this post on Zulip dsh (Apr 16 2021 at 14:54):

dsh said:

Thanks James Agnew changing the value to hibernate.hbm2ddl.auto: update helped and I was able to start JPA normally and see the data only if JDBC (postgresql) user is super user with DDL rights. However if the user is a regular user with DML rights then I get these kinds of errors

Hibernate: create sequence SEQ_VALUESET_PID start 1 increment 50
2021-04-14 17:45:12.719 [main] WARN  o.h.t.s.i.ExceptionHandlerLoggedImpl [ExceptionHandlerLoggedImpl.java:27] GenerationTarget encountered exception accepting command : Error executing DDL "create sequence SEQ_VALUESET_PID start 1 increment 50" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create sequence SEQ_VALUESET_PID start 1 increment 50" via JDBC Statement

Caused by: org.postgresql.util.PSQLException: ERROR: relation "seq_spidx_quantity_nrml" already exists
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309)
    at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:267)
    at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:98)
    at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
    at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)```
````
@**James Agnew** or @**Ian Bacher**  any pointers here ^ ?

view this post on Zulip James Agnew (Apr 16 2021 at 15:38):

sounds like you need to give the user more privileges

view this post on Zulip dsh (Apr 16 2021 at 15:52):

@James Agnew since the "seq_spidx_quantity_nrml" relation already exists any idea on why its need to be recreated? and the surprising thing is its no impacting any resource creation logic ... but may this will bite when write load is heavy

view this post on Zulip dsh (Apr 16 2021 at 16:02):

For those facing the same problem I was able to cross this hurdle by executing the output of this statement in psql shell

select 'ALTER TABLE ' || sequence_name || ' OWNER TO hapi_user;' from information_schema.sequences where sequence_schema = 'public';

change hapi_user to whatever your username is


Last updated: Apr 12 2022 at 19:14 UTC