Stream: implementers
Topic: parameter _lastUpdated not working
Ramandeep (May 03 2021 at 19:41):
Hi All,
We are using a query to search Organizations role=OUTPHARM&telecom-fax%3Aexact=4859414204&_lastUpdated=gt2021-04-30T00:12:23. We are facing a strange Issue where the search doesnt work if its midnight. I am attaching the logs as well.
2021-05-03 18:17:46.883 +0000 ERROR [ http-nio-8010-exec-10] [f.r.s.interceptor.ExceptionHandlingInterceptor:140] Failure during REST processing { req.uuid=1234567890 }
ca.uhn.fhir.rest.server.exceptions.InternalErrorException: Failed to call access method: java.lang.IllegalArgumentException: can't parse argument number: _lastUpdated
Do we have a fix for this and Is this a known Issue ?
Thanks
Josh Mandel (May 03 2021 at 19:45):
Is this a question for a specific server developer? Your logs suggest you're working with https://www.telus.com/en/partner/our-solutions/digital-health/health-exchange-international -- so this would be a question for them
Ramandeep (May 03 2021 at 19:47):
Hi @James Agnew can you please help me in this regard
Craig McClendon (May 03 2021 at 20:23):
The public HAPI server does not have a problem with your date:
http://hapi.fhir.org/baseR4/Patient?_lastUpdated=gt2030-04-30T00:12:23
(note: I changed the year so people would not hammer the server with large results).
This error message :
Caused by: java.lang.NumberFormatException: For input string: "_lastUpdated"
suggests the server is trying to interpret the word "_lastUpdated" as a number.
I would try desconstructing your query piece by piece. Try it first just against lastUpdated, then add the other params. I suspect you have some bad syntax or there is a URL-escaping problem somewhere.
edit to add: I notice you are escaping the colon before :exact, but not the colons in the date - could be something else to look at.
Ramandeep (May 03 2021 at 21:03):
Thanks @craig mcclendon : I will try to fix it as per your suggestion, I will update how it goes.
James Agnew (May 03 2021 at 21:25):
FWIW, I'd say this is the relevant bit of your stack trace:
Caused by: java.lang.IllegalArgumentException: can't parse argument number: _lastUpdated
at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)
at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
at java.text.MessageFormat.<init>(MessageFormat.java:380)
at org.springframework.context.support.MessageSourceSupport.createMessageFormat(MessageSourceSupport.java:159)
at org.springframework.context.support.ReloadableResourceBundleMessageSource$PropertiesHolder.getMessageFormat(ReloadableResourceBundleMessageSource.java:616)
at org.springframework.context.support.ReloadableResourceBundleMessageSource.resolveCode(ReloadableResourceBundleMessageSource.java:206)
at org.springframework.context.support.AbstractMessageSource.getMessageInternal(AbstractMessageSource.java:221)
at org.springframework.context.support.AbstractMessageSource.getMessage(AbstractMessageSource.java:136)
at com.telushealth.exchange.cs.common.spring.messages.Messages.getMessage(Messages.java:115)
at com.telushealth.exchange.cs.common.hapi.OperationOutcomeBuilder.getMessageDefaultEmpty(OperationOutcomeBuilder.java:262)
at com.telushealth.exchange.cs.common.hapi.OperationOutcomeBuilder.createOperationOutcome(OperationOutcomeBuilder.java:129)
at com.telushealth.exchange.cs.tprcacheservice.handler.FhirOperationOutcomeBuilder.createOperationOutcome(FhirOperationOutcomeBuilder.java:45)
at com.telushealth.exchange.cs.tprcacheservice.controller.OrganizationController.searchOrganizationsForBulkSyncWithFaxNumber(OrganizationController.java:287)
For what it's worth, my own approach to debugging this would be to put a breakpoint at MessageFormat.java : 1429
and then walk down the stack when you hit it. That message looks like a malformed message format object or something like that. It doesn't appear to be coming from HAPI though.
Last updated: Apr 12 2022 at 19:14 UTC