Skip to content

[Help]: Could not find a Task/Message for 84ced8e6-3705-41c6-9158-f2b880463a32 #995

Description

@guofengzh

What happened?

Hi,

I encountered a problem when integrating the A2A Java SDK 1.1.0.final with Spring Boot 4, and I cannot solve it myself. I am asking for help here.

Following the approach of A2A Java SDK for Spring Framework project, I attempted to migrate the helloworld project of the a2aproject to Spring Boot 4. Unfortunately, I encountered an error message when testing SendMessage.

Could not find a Task/Message for 84ced8e6-3705-41c6-9158-f2b880463a32

Tracing the program revealed that TaskManager.saveTask(...) was never called during runtime. Therefore, when ResultAggregator.consumeAndBreakOnInterrupt(...) attempted to call TaskManager.getTask(), the program failed because the task had never been stored in TaskStore.

I can't figure out where the problem is. It might be that I haven't understood some special configuration details in v1.0.0.final, leading to incorrect A2A server configuration, or the controller may have missed processing something when receiving messages. I sincerely request that an expert provide guidance and help me find the problem.

I've minimized my project, including only the code needed for SendMessage, so you can check for issues.

  1. ServerConfig is used to assemble the A2A Java SDK server components.
  2. SendMessageController is used to receive SendMessage messages from the client.

Use Postman to test.

Healder: "A2A-Version: 1.0".

Body:

{
  "jsonrpc": "2.0",
  "id": "6e7bf51a-f364-42d7-a060-343da3cc4f43",
  "method": "SendMessage",
  "params": {
    "message": {
      "messageId": "messageId-1",
      "role": "ROLE_USER",
      "parts": [
        {
          "text": "Can you check systems?"
        }
      ]
    }
  }
}

Response: 200 OK

{
    "error": {
        "cause": null,
        "code": -32603,
        "details": {},
        "localizedMessage": "Could not find a Task/Message for 84ced8e6-3705-41c6-9158-f2b880463a32",
        "message": "Could not find a Task/Message for 84ced8e6-3705-41c6-9158-f2b880463a32",
        "stackTrace": [
            {
                "classLoaderName": "app",
                "className": "org.a2aproject.sdk.server.tasks.ResultAggregator",
                "fileName": "ResultAggregator.java",
                "lineNumber": 253,
                "methodName": "consumeAndBreakOnInterrupt",
                "moduleName": null,
                "moduleVersion": null,
                "nativeMethod": false
            },
            {
                "classLoaderName": "app",
                "className": "org.a2aproject.sdk.server.requesthandlers.DefaultRequestHandler",
                "fileName": "DefaultRequestHandler.java",
                "lineNumber": 483,
                "methodName": "onMessageSend",
                "moduleName": null,
                "moduleVersion": null,
                "nativeMethod": false
            },
            {
                "classLoaderName": "app",
                "className": "org.a2aproject.sdk.transport.jsonrpc.handler.JSONRPCHandler",
                "fileName": "JSONRPCHandler.java",
                "lineNumber": 234,
                "methodName": "onMessageSend",
                "moduleName": null,
                "moduleVersion": null,
                "nativeMethod": false
            },
            {
                "classLoaderName": "app",
                "className": "llms.devs.a2a.server.controller.SendMessageController",
                "fileName": "SendMessageController.java",
                "lineNumber": 57,
                "methodName": "handleSendMessageRpc",
                "moduleName": null,
                "moduleVersion": null,
                "nativeMethod": false
            },
            .......
        ],
        "suppressed": []
    },
    "id": "6e7bf51a-f364-42d7-a060-343da3cc4f43",
    "jsonrpc": "2.0",
    "result": null
}

This is the log file.

Thanks for your help.

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions