You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "smongiar (via GitHub)" <gi...@apache.org> on 2026/05/07 12:15:17 UTC

[PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

smongiar opened a new pull request, #23043:
URL: https://github.com/apache/camel/pull/23043

   When `camel-launcher` is packaged as a Spring Boot executable JAR using `camel-repackager-maven-plugin`, the Jolokia agent JAR is nested inside `BOOT-INF/lib/` and cannot be resolved as a real filesystem path.
   
   `OptionsAndArgs.lookupJarFile()` uses `getProtectionDomain().getCodeSource().getLocation()` which returns the fat JAR instead of the nested Jolokia agent JAR. When `VirtualMachine.loadAgent()` tries to load the fat JAR as an agent, it fails with:
   
   ```
   ERROR: Cannot execute jolokia command due: Error while loading Jolokia agent to a JVM process
   ```
   
   This fix detects when the resolved JAR is not a valid Jolokia agent (by checking the manifest for `Agent-Class`) and extracts the actual agent JAR from inside the fat JAR to a temp file, allowing `loadAgent()` to use a real filesystem path.
   
   The temp file is cleaned up in a `finally` block after use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4399484675

   LGTM what do you say @Croway 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4397852762

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `dsl/camel-jbang/camel-jbang-core`
   - `dsl/camel-jbang/camel-launcher`
   
   :white_check_mark: **POM dependency changes: targeted tests included**
   
   <details><summary>Modules affected by dependency changes (2)</summary>
   
   - `:camel-jbang-core`
   - `:camel-launcher`
   
   </details>
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `dsl/camel-jbang/camel-jbang-core`: 1 test(s) disabled on GitHub Actions
   
   :bulb: **Manual integration tests recommended:**
   
   > You modified `dsl/camel-jbang/camel-jbang-core`, `dsl/camel-jbang/camel-launcher`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
   > ```
   > mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
   > ```
   
   <details><summary>All tested modules (7 modules)</summary>
   
   - Camel :: JBang :: Core
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher
   - Camel :: Launcher :: Container
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/25497959929)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4397610943

   @davsclaus https://github.com/apache/camel/pull/23043/changes#diff-bd6c1fc0829371210347b5502274eb69e57fef7b2a526b5bc5c964117c020ba0R240 will be part of camel-launcher, is it expected?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4397079853

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "smongiar (via GitHub)" <gi...@apache.org>.
smongiar commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4397634536

   > @davsclaus https://github.com/apache/camel/pull/23043/changes#diff-bd6c1fc0829371210347b5502274eb69e57fef7b2a526b5bc5c964117c020ba0R240 will be part of camel-launcher, is it expected?
   
    'camel-jbang` is misleading in description. It's involved, but it's specifically a camel-launcher bug, we need this, for hawtio integration


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #23043:
URL: https://github.com/apache/camel/pull/23043#issuecomment-4397623914

   that would be expected if this makes the jolokia goal work (and that we want to have such feature in the launcher) - it would be needed for hawtio goal as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] camel-jbang: Fix Jolokia command when running from camel-launcher nested JAR [camel]

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway merged PR #23043:
URL: https://github.com/apache/camel/pull/23043


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org