oracle/graal · warning

Calling unimplemented mokapot %s

Error message

Calling unimplemented mokapot %s

What it means

Printed by the UNIMPLEMENTED(name) macro in mokapot.h when native code calls a JNI/POSIX-style entry point that mokapot (Espresso's C-level JVM interface, the JNI replacement layer) has not implemented yet. It writes to stderr and returns; execution continues, so the call silently does nothing rather than crashing. Seeing it means guest native code exercised a JNI surface area the embedded JVM does not cover.

Source

Thrown at espresso/src/com.oracle.truffle.espresso.mokapot/include/mokapot.h:45

#include "jni.h"
#include "os.h"

#include "libjavavm_dynamic.h"

#include <stddef.h>
#include <stdint.h>

struct MokapotNativeInterface_;
struct MokapotEnv_;

#ifdef __cplusplus
typedef MokapotEnv_ MokapotEnv;
#else
typedef const struct MokapotNativeInterface_ *MokapotEnv;
#endif

#define UNIMPLEMENTED(name) \
  fprintf(stderr, "Calling unimplemented mokapot %s" OS_NEWLINE_STR, #name);

#define IMPLEMENTED(name) do {} while (0);

// Methods implemented in C (not Java call)
#define NATIVE(name) do {} while (0);

// Additional Java basic types

typedef uint8_t  jubyte;
typedef uint16_t jushort;
typedef uint32_t juint;
typedef uint64_t julong;

// A VM created from espresso host Java code through initializeMokapotContext
#define MOKA_RISTRETTO ((void *)11)
// A VM created from JNI_CreateJavaVM
#define MOKA_LATTE ((void *)22)
// A MOKA_RISTRETTO VM that is used by a MOKA_LATTE VM

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Identify the exact function name from the stderr line ('Calling unimplemented mokapot <name>')
  2. Check the Espresso/GraalVM release notes for newly implemented JNI entry points and upgrade
  3. Recompile the native library against a restricted JNI API, or replace the call path with a Java-side equivalent
  4. Report the missing entry point to the Espresso maintainers with a reproducer
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Guest native libraries calling less-common JNI functions (e.g. DefineClass variants, certain monitor/JNI reflection slots) whose mokapot stub is generated with UNIMPLEMENTED instead of a real body.

Common situations: Running third-party native libraries (database drivers, crypto, compression) inside Espresso/native-image; upgrading a library that starts using a JNI function nobody had called before.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/2f15eb3844111560. Report an issue: GitHub.