pinpoint-apm/pinpoint · error · IllegalStateException

invoke fail Caused by:

Error message

invoke fail Caused by:

What it means

Generic sentinel from J9BootLoader reflective dispatch: an invoke on a bootstrap ClassLoader method failed (the 'invoke fail Caused by:' text prefixes the underlying InvocationTargetException/IllegalAccessException cause). It fires when the reflective call inside findResources throws on this J9 VM.

Solutions

  1. Read the chained cause exception to see the actual reflective invocation failure
  2. Confirm the target method signature still matches on the installed J9 JDK
  3. Ensure setAccessible(true) succeeded (no module/JPMS restrictions)
  4. Fall back to a non-reflective resource lookup if the J9 API is incompatible
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/classloader/J9BootLoader.java:90 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/4002a08bb27416ca. Report an issue: GitHub.

Appendix: source

Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/classloader/J9BootLoader.java:90

    private static Method getMethod(Class<?> bootstrapClassLoader, String methodName, Class<?>... parameterTypes) {
        try {
            Method declaredMethod = bootstrapClassLoader.getDeclaredMethod(methodName, parameterTypes);
            declaredMethod.setAccessible(true);
            return declaredMethod;
        } catch (NoSuchMethodException e) {
            throw new IllegalStateException(methodName + " not found Caused by:" + e.getMessage(), e);
        }

    }

    @Override
    public Enumeration<URL> findResources(String name) throws IOException {
        try {
            return (Enumeration<URL>) findResources.invoke(bootstrapClassLoader, name);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException("access fail Caused by:" + e.getMessage(), e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException("invoke fail Caused by:" + e.getMessage(), e);
        }
    }

    @Override
    public URL findResource(String name) {
        try {
            return (URL) findResource.invoke(bootstrapClassLoader, name);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException("access fail Caused by:" + e.getMessage(), e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException("invoke fail Caused by:" + e.getMessage(), e);
        }
    }

    @Override
    public Class<?> findBootstrapClassOrNull(ClassLoader classLoader, String name) {
        try {
            return bootstrapClassLoader.loadClass(name);

View on GitHub (pinned to 744c3d3075)