SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 143 forks source link

Demis- New lab message are not fetched #12215

Closed abrudanancuta closed 1 year ago

abrudanancuta commented 1 year ago

Bug Description

The new lab messages are not received in Sormas when fetching external messages FetchError.txt

[2023-06-27T13:19:27.705+0200] [Payara 5.2021.10] [INFO] [] [] [tid: _ThreadID=97 _ThreadName=http-thread-pool::http-listener-1(1)] [timeMillis: 1687864767705] [levelValue: 800] [[
  E131927.704|     > Error while processing RKI Request (de.symeda.sormas.demis.adapter.ErrorCapturingResilientService.java:37)
ca.uhn.fhir.context.ConfigurationException: HAPI-1686: hapi-fhir-client does not appear to be on the classpath
    at ca.uhn.fhir.context.FhirContext.getRestfulClientFactory(FhirContext.java:649)
    at de.rki.demis.importer.ClientGenerator.createClient(ClientGenerator.java:68)
    at de.symeda.sormas.demis.adapter.importermod.ReticentQueryExecutor.execute(ReticentQueryExecutor.java:43)
    at de.symeda.sormas.demis.adapter.DemisMessageAdapter.lambda$fetchNotifications$0(DemisMessageAdapter.java:137)
    at io.github.resilience4j.bulkhead.Bulkhead.lambda$decorateSupplier$5(Bulkhead.java:196)
    at io.github.resilience4j.retry.Retry.lambda$decorateSupplier$2(Retry.java:213)
    at io.github.resilience4j.retry.Retry.lambda$decorateSupplier$2(Retry.java:213)
    at io.vavr.control.Try.of(Try.java:75)
    at io.vavr.control.Try.ofSupplier(Try.java:92)
    at de.symeda.sormas.demis.adapter.ErrorCapturingResilientService.execute(ErrorCapturingResilientService.java:36)
    at de.symeda.sormas.demis.adapter.DemisMessageAdapter.fetchNotifications(DemisMessageAdapter.java:137)
    at de.symeda.sormas.demis.adapter.DemisMessageAdapter.fetchAndFilterNotifications(DemisMessageAdapter.java:120)
    at de.symeda.sormas.demis.adapter.DemisMessageAdapter.getPartialResult(DemisMessageAdapter.java:145)
    at de.symeda.sormas.demis.adapter.DemisMessageAdapter.getExternalMessages(DemisMessageAdapter.java:107)
    at de.symeda.sormas.demis.DemisMessageFacadeEjb.getExternalMessages(DemisMessageFacadeEjb.java:56)
...
    at de.symeda.sormas.api.externalmessage.__ExternalMessageAdapterFacade_Remote_DynamicStub.getExternalMessages(de/symeda/sormas/api/externalmessage/__ExternalMessageAdapterFacade_Remote_DynamicStub.java)
    at de.symeda.sormas.api.externalmessage._ExternalMessageAdapterFacade_Wrapper.getExternalMessages(de/symeda/sormas/api/externalmessage/_ExternalMessageAdapterFacade_Wrapper.java)

Reproduction Steps

  1. Have a new lab message sent to Demis Adapter
  2. Login with a Admin+Nat user
  3. Go to messages and Fetch the new labs Screenshot 2023-06-27 at 14 25 36

Expected Behavior

New lab messages should be received in Sormas

Affected Area(s)

Web app

SORMAS Version

1.86.0-snapshot

Android version/Browser

-

User Role(s)

NatUser + Admin

Server URL

test-de2

Additional Information

No response

ChristopherRiedel commented 1 year ago

The current suspicion is that a server property that has been renamed (#12022) has not yet been customized on the system.

leventegal-she commented 1 year ago

Tested with v1.85 and it works. It looks like since #11963 some dependencies are not deployed.

The error in the provided log is "HAPI-1686: hapi-fhir-client does not appear to be on the classpath"

@StefanKock @MartinWahnschaffe can you please have a look on it?

StefanKock commented 1 year ago

I checked the StackTrace.

  1. The old payara 5.2021.10 was used. Update to avoid problems coming from not supported versions
  2. The StackTrace comes from a demis-adapter class -> move to other repo.
  3. A change that came from https://github.com/SORMAS-Foundation/SORMAS-Project/issues/11963 is that the following dependencies are now provided as serverlibs (with matching 6.2.2 for hapi-fhir). This might cause a lookup problem.
    • ca.uhn.hapi.fhir-hapi-fhir-base
    • ca.uhn.hapi.fhir-hapi-fhir-structures-r4
    • ca.uhn.hapi.fhir-org.hl7.fhir.r4
    • ca.uhn.hapi.fhir-org.hl7.fhir.utilities

The class FhirContext is in three libraries in sormas-demis-adapters classpath:

StefanKock commented 1 year ago

I discussed with @MateStrysewske and @carina29 that fiddling with dependencies now in the demis-adapter is not an option since demis-importer-1.7.0.jar contains a lot of dependencies (hapi-fhir, logback, ...), but that for now handling hapi-fhir as compile of sormas-backend dependency should help.

StefanKock commented 1 year ago

handling hapi-fhir as compile of sormas-backend dependency should help.

Done, should be evaluated again on test-de2 when changes are deployed (just started the build). If approved this finding can be discarded.

carina29 commented 1 year ago

@StefanKock I've tested on test-de2 and the messages are fetched correctly so we can close this ticket. :) image

adinaflorea9 commented 1 year ago

Verified ticket on https://test-de2.sormas.netzlink.com/sormas-ui/ using SORMAS version 1.86.0-SNAPSHOT(39109a3) - new messages have been successfully fetched with the report date of today 10/07/2023, on the 09/07/2023 and 08/07/2023. Currently there are no new messages available: image