Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`IndyBootstrapDispatcher` cannot be properly loaded in the Resin environment

オープン
#3,807 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
observability

調査の方向性

まず、$RESIN_HOME/bin/httpd.sh、resin.conf の JVM 引数、vulns.war のセットアップを使って失敗を再現します。resin.jar 内の com.caucho.boot.WatchdogProcess#createProcess と、Resin 3 の tree-node クラスローディングパスを読み、その期待される java/lang/IndyBootstrapDispatcher.class エントリと shaded agent のパスを比較します。Resin がクラスをロードし、エージェント機能が動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

agent-java community

Describe the bug

When starting Resin 3 using the provided startup script ($RESIN_HOME/bin/httpd.sh), the runtime is unable to load java.lang.IndyBootstrapDispatcher via the DynamicClassLoader.

After some investigation, I found that the startup script ultimately calls the com.caucho.boot.WatchdogProcess#createProcess method (located in resin.jar) to launch Resin. This method hardcodes the startup argument -Djava.system.class.loader=com.caucho.loader.SystemClassLoader, which replaces the default system class loader.

As a result, when Resin tries to load IndyBootstrapDispatcher, the DynamicClassLoader delegates the loading to SystemClassLoader, which is unable to load it. In Resin 3, the resin.conf file provides a tree-node element to configure special JAR file paths, allowing SystemClassLoader to access the target files. However, the internal implementation is hardcoded to fetch the target entry from the JAR file, like configuredJars.getJarEntry("java/lang/IndyBootstrapDispatcher.class").

The issue is that Elastic has shaded the class, and its actual resource path is represented as agent/bootstrap/java/lang/IndyBootstrapDispatcher.esclazz. This mismatch causes the class loading to fail, leading to malfunctioning agent functionality.

All the above is specific to Resin 3. Resin 4 might have the same problem, but I haven't tested it yet.

Steps to reproduce

  1. In the resin.conf file, add the following configuration
<jvm-arg>-javaagent:/path/to/elastic-apm-agent.jar</jvm-arg>
<jvm-arg>-Delastic.apm.log_level=DEBUG</jvm-arg>
<jvm-arg>-Delastic.apm.log_file=/path/to/logs/elastic-apm-agent.log</jvm-arg>
  1. download the vulns.jar to $RESIN_HOME/webapps
  2. RUN $RESIN_HOME/bin/httpd.sh start
  3. Access http://localhost:7040/vulns through your browser
主要言語
Java
スター
593
フォーク
339
平均マージ
1日 9時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

elastic/apm-agent-java のほかの issue

elastic/apm-agent-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。