PostgreSQL Unable to detect database type

305 views
Skip to first unread message

Jordan Force

unread,
Aug 24, 2022, 5:12:26 PM8/24/22
to HAPI FHIR
Hi everyone,

I'm trying to use PostgreSQL with HAPI and docker. I changed my docker-compose.yml and application.yml files to accommodate this, but I'm getting:

"Caused by: java.lang.IllegalStateException: Unable to detect database type"

I saw that there was this: https://groups.google.com/g/hapi-fhir/c/gGECVo4nLZw/m/-xHFeOgHAQAJ, but it didn't help. I created a database called "hapi" in the PostgreSQL instance, and that didn't fix it. I'm attaching my application.yaml and my docker-compose.yml files. I'm having a lot of trouble here, and if someone could help me out that would be great.

Thanks,

Jordan
application.yaml
docker-compose.yml

Franco Ulloa Medina

unread,
Aug 24, 2022, 5:58:33 PM8/24/22
to HAPI FHIR
Hi in application.yaml  jdbc:postgresql://localhost:5432/hapi ->  jdbc:postgresql://hapi-fhir-postgres:5432/hapi  then create database hapi in postgres

Mohamed Omar

unread,
Aug 25, 2022, 12:41:21 AM8/25/22
to Jordan Force, HAPI FHIR
Do you have the postgres java connecter package installed on the application server image? if you have a shell on the image can you issue a psql command ?

--
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/1e65e92b-07d8-4927-a7b0-4aa2a9a32ae2n%40googlegroups.com.


--
Mohamed Omar
Solutions Architect 


Jordan Force

unread,
Aug 25, 2022, 10:00:30 AM8/25/22
to HAPI FHIR
Actually, it I tried running "docker exec -it <containerID> bash" on the JPA server starter container (https://github.com/hapifhir/hapi-fhir-jpaserver-starter), and it doesn't seem to have bash installed. Which is weird.

Jordan Force

unread,
Aug 25, 2022, 10:01:13 AM8/25/22
to HAPI FHIR
Thanks Franco, that fixed it. I guess I misunderstood how networking works in docker compose.

Patrick Werner

unread,
Aug 25, 2022, 10:07:57 AM8/25/22
to Jordan Force, HAPI FHIR
Hi,

This is a distroless container, if you want to debug you can use the tomcat based one:
hapiproject/hapi:latest-tomcat

cheers
Patrick

Reply all
Reply to author
Forward
0 new messages