Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Jpa server example fails with search parameter list with more than 5 elements #744
I have been struggling with this issue in my implementation. In an effort to resolve I built the hapi-jpa-fhir-example and was hoping to bring in my code bit by bit until I discovered the issue. However, the example has the issue straight away.
This works fine:
However this returns a 500 with a processing error:
I know the fhirtest server works in both cases, so I investigated that and found something interesting. In the web.xml, ca.uhn.fhirtest.config.DbServerConfig is specified as the context config, but it's an empty class with the last commit message stating "JPA server was not correctly validating and expanding SCT codes", which seems related to the issue I am having. I tried to imitate this in my implementation, but I get missing bean errors.
I would love some guidance on how to bypass this issue. Thanks!
AUUUUGGHHHHH stupid derby :)
This is an issue i have worked around a million times and it has burned me yet again
The longer query isn't failing for any interesting reason related to the codes or the parameters or anything like that... it's failing because it's longer than 256 characters and Derby's version of a CLOB column defaults to that asinine length unless you are explicit that you want longer, and gives a meaningless NullPointerException if you exceed that.
Fix coming up.
BTW the reason it's not failing on fhirtest is because we use Postgres there. For what it's worth, I'm not sure how "real" the thing you are doing is, but if it's anything more than a basic POC I'd highly recommend using PG/MySQL/MSSQL/Oracle/etc instead of Derby.