Stream: implementers
Topic: HAPI Kotlin provider registration
Théo Matussière (May 15 2020 at 14:34):
Hi everyone,
Following my first topic for setting up in kotlin, I'm struggling to get the servlet to recognize my endpoints.
E.g. the server works, but hitting localhost:8088/fhir/Patient/1
results in a 404.
Adding a screen with the few concerned files: Screenshot-2020-05-15-at-16.26.41.png
And the log for the jettyRun task: log.txt
I'm at a loss as to what it takes for the provider to be recognized, which it would appear to be per the logs, and answer to /fhir/Patient/someId
.
Taking all pointers, thanks a lot!
Théo
Théo Matussière (May 15 2020 at 14:42):
Small precision: I've tried to use the registerProviders
function instead of the implied setter for resourceProviders = ...
but it doesn't work either
Théo Matussière (May 18 2020 at 15:12):
@Jens Villadsen @Jelmer ter Wal apologies for the wild tagging, retrying my luck :)
Jens Villadsen (May 18 2020 at 16:16):
Does /fhir/metadata work?
Théo Matussière (May 18 2020 at 16:59):
Thanks! it doesn't, 404 too
Théo Matussière (May 18 2020 at 17:02):
I'd have tried the debugger but nothing goes through my breakpoints, which is predictable since nothing happens. If I understand correctly the right level for the breakpoints would be in the code injection that's done by the jetty/servlet things ?
Jens Villadsen (May 18 2020 at 19:14):
could it be because you have written a gretty contextpath as well?
does /fhir/fhir/metadata
work?
or instead:
gretty {
httpPort = 8088
contextPath = '/'
servletContainer = 'jetty9.4'
}
and see if you can access the metadata at /fhir/metadata
Théo Matussière (May 19 2020 at 07:43):
Oh man do I feel silly, indeed, /fhir/fhir/metadata
works, I'll set gretty's context path to the root indeed.
Théo Matussière (May 19 2020 at 07:44):
Very grateful you took the time!
Jens Villadsen (May 19 2020 at 09:45):
no problemo
Last updated: Apr 12 2022 at 19:14 UTC