Skip to content

Exception while using Large Objects bei der Nutzung von Chunking

Description of the bug:

Bei der Nutzung großer Fachdaten, die als Attachment übermittelt werden und für die Übertragung in mehrere Chunks aufgeteilt werden, kommt es beim Empfang zu einer Fehlermeldung des Zustelldienstes, die eine Abholung der Daten verhindert.

Es geht um die Submission-ID 2f389e8f-5236-4ee2-8eb6-c6e22637ba20 und das Attachment b6eea2be-ac02-4d60-bcee-381a3357d1a5.

ZSD-Log aus Kibana

{
    "@timestamp": "2025-04-03T11:33:00.968031281Z",
    "@version": "1",
    "message": "[Unexpected error]: Exception while using Large Object API",
    "logger_name": "de.fitko.zustelldienst.common.api.ExceptionAdvice",
    "thread_name": "http-nio-8080-exec-8",
    "level": "ERROR",
    "level_value": 40000,
    "method": "GET",
    "path": "/submission-api/v1/submissions/2f389e8f-5236-4ee2-8eb6-c6e22637ba20/attachments/b6eea2be-ac02-4d60-bcee-381a3357d1a5",
    "subject": "1decc3cc-6390-485d-9dc7-759d6fcc4ee9",
    "stack_trace": "java.lang.RuntimeException: Exception while using Large Object API\n\tat de.fitko.zustelldienst.attachments.PostgresBinaryLargeObjectService.writeToOutputStream(PostgresBinaryLargeObjectService.java:51)\n\tat de.fitko.zustelldienst.attachments.BinaryLargeObjectService.writeToOutputStream(BinaryLargeObjectService.java:125)\n\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)}"
...
}

{
    "@timestamp": "2025-04-03T11:33:00.971113969Z",
    "@version": "1",
    "message": "[d2d4aff2-b9cc-42a8-a369-565fa3f30ab3] - Error 500 INTERNAL_SERVER_ERROR: Exception while using Large Object API",
    "logger_name": "de.fitko.zustelldienst.common.api.ExceptionAdvice",
    "thread_name": "http-nio-8080-exec-8",
    "level": "ERROR",
    "level_value": 40000,
    "method": "GET",
    "path": "/submission-api/v1/submissions/2f389e8f-5236-4ee2-8eb6-c6e22637ba20/attachments/b6eea2be-ac02-4d60-bcee-381a3357d1a5",
    "subject": "1decc3cc-6390-485d-9dc7-759d6fcc4ee9"
}

{
    "@timestamp": "2025-04-03T11:33:00.971938365Z",
    "@version": "1",
    "message": "Failure in @ExceptionHandler de.fitko.zustelldienst.common.api.ExceptionAdvice#handleTechnicalException(Throwable)",
    "logger_name": "org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver",
    "thread_name": "http-nio-8080-exec-8",
    "level": "WARN",
    "level_value": 30000,
    "method": "GET",
    "path": "/submission-api/v1/submissions/2f389e8f-5236-4ee2-8eb6-c6e22637ba20/attachments/b6eea2be-ac02-4d60-bcee-381a3357d1a5",
    "subject": "1decc3cc-6390-485d-9dc7-759d6fcc4ee9",
    "stack_trace": "org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class org.springframework.http.ProblemDetail] with preset Content-Type 'application/jose;charset=UTF-8'\n\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:365)}"
....
}

Current behavior:

Der Fehler verhindert einen Empfang der Daten mit der Fehlermeldung, dass ein Attachment nicht geladen werden kann.

fail: Prosoz.Core.Xoev.ConnectXoevExchange.FitConnectConnectorFacade.FitConnectConnectorFacade[0]
      Error validating JSON schema
ArrayItemNotValid: #/events.https://schema.fitko.de/fit-connect/events/reject-submission.problems[0]
{
  PatternMismatch: #/events.https://schema.fitko.de/fit-connect/events/reject-submission.problems[0].instance
}
 
 
fail: Prosoz.Core.Xoev.ConnectXoevExchange.FitConnectConnectorFacade.FitConnectConnectorFacade[0]
      Error while receiving submission
      System.Exception: Invalid token schema for 
{
    "sub": "submission:2f389e8f-5236-4ee2-8eb6-c6e22637ba20",
    "jti": "41fa0b80-f4a0-4fc7-ad18-902e2e4f0e64",
    "iat": 1743662407,
    "iss": "e021dc10-2ae5-423f-9777-6a51ded030a5",
    "txn": "case:6d040c2c-7385-4a3a-818f-f1bb6ddaf61b",
    "events": {
        "https://schema.fitko.de/fit-connect/events/reject-submission": {
            "problems": [
                {
                    "instance": "attachment:[b6eea2be-ac02-4d60-bcee-381a3357d1a5, ]",
                    "detail": "Unable to load attachment [b6eea2be-ac02-4d60-bcee-381a3357d1a5, ]",
                    "title": "List of attachments is invalid",
                    "type": "https://schema.fitko.de/fit-connect/events/problems/missing-attachment"
                }
            ]
        }
    },
    "$schema": "https://schema.fitko.de/fit-connect/set-payload/1.2.2/set-payload.schema.json"
}

Expected behavior:

Der Zustelldienst soll auch große Anlagen zuverlässig zum Download zur Verfügung stellen können, ohne dass ein Server-Error dies verhindert.

Environments:

PROD

Additional Information:

Log-Einträge aus Kibana: ZSD-Logs.txt

Dependency / relationship to other issues:

Bisher hat Klaus Fischer an dem Thema gearbeitet, da eine Fehler im .Net-SDK vermutet wurde, bis wir die Server-fehler im ZSD-Log und Reverse-Proxy gefunden haben

Responsible person / team:

Contact persons including contact details:

Screenshots / Logs / Requests:

Checklist:

  • Add Severity label
  • Add team label
  • Related/affected issues/stories/epics linked and explained in the bug issue
  • Creation of an automated test
  • Bugfix deployed on DEV
  • Bugfix tested on DEV
  • Bugfix deployed on TEST
  • Bugfix tested on TEST (possibly also by the connection project itself)
  • Successful fix reported to Team Operations (Teams channel)
  • Bugfix deployed on STAGE
  • Bugfix tested on STAGE if necessary
  • Bugfix deployed on PROD
  • Bugfix tested on PROD (possibly also by the connection project itself)
  • Final communication by Team Operations if necessary
  • Internal documentation was checked and updated if necessary
  • External documentation has been checked and updated if necessary
  • Updated changelog if necessary

Approach/Solution:

Release version of the artifact: