Skip to content

Fix JMA agent property names: use underscores not hyphens #1265

Closed

Description

@stokpop

Problem

The Java Memory Assistant agent fails to start with:

com.sap.jma.Agent#ERROR: JavaMemoryAssistant cannot start
java.util.NoSuchElementException: The option 'jma.check-interval' is unknown

When using:

JBP_CONFIG_JAVA_MEMORY_ASSISTANT: '{enabled : true, agent: { thresholds : { heap: "80%" }, heap_dump_folder: /home/vcap/, check_interval: 5m } }'

Root Cause

The Go buildpack emits JVM system properties with hyphens, but the JMA agent expects underscores (matching the original Ruby buildpack):

Go (wrong) Should be
-Djma.check-interval -Djma.check_interval
-Djma.max-frequency -Djma.max_frequency
-Djma.heap-dump-folder -Djma.heap_dump_folder
-Djma.log-level -Djma.log_level
-Djma.threshold.* -Djma.thresholds.*

Additionally, heap_dump_folder set via config is silently ignored (always defaults to $PWD).

Activity

  1. added a commit that references this issue on May 20, 2026
    abc0a34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions