Skip to content

Commit 21b2ce5

Browse files
lciancursoragent
authored andcommitted
feat(java): add troubleshooting page for Maven CLI failure (#14408)
Co-authored-by: Cursor Agent <[email protected]>
1 parent 11dc193 commit 21b2ce5

File tree

1 file changed

+42
-0
lines changed
  • docs/platforms/java/common/troubleshooting/sentry-cli-execution-failure

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Sentry CLI Execution Failure when using Sentry Maven plugin
3+
description: "Troubleshoot and resolve Sentry CLI execution failures when using the Sentry Maven plugin."
4+
sidebar_order: 1001
5+
---
6+
7+
The Sentry Maven plugin may fail to execute Sentry CLI in certain environments.
8+
9+
## Symptoms
10+
11+
- A build using `sentry-maven-plugin` fails during execution of `sentry-cli` (e.g. to collect and upload a source bundle).
12+
- Enabling debug logs for `sentry-cli` doesn't show meaningful errors from `sentry-cli` itself.
13+
14+
To enable debug logs, set
15+
16+
```xml
17+
<debug>false</debug>
18+
<debugSentryCli>true</debugSentryCli>
19+
```
20+
21+
in your `<configuration>` for `sentry-maven-plugin`.
22+
23+
You might see similar lines in the logs:
24+
25+
```
26+
[ERROR] Error while attempting to run Sentry CLI:
27+
org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "/bin/sh" [...]
28+
```
29+
30+
## Solution
31+
32+
Add the following JVM option to switch the process launch mechanism to `vfork`:
33+
34+
```bash
35+
-Djdk.lang.Process.launchMechanism=vfork
36+
```
37+
38+
## Related Issue
39+
40+
For more details about this issue and the investigation process, see [GitHub Issue #169](https://github.com/getsentry/sentry-maven-plugin/issues/169).
41+
42+
If this doesn't solve the problem, please [open a new issue on GitHub](https://github.com/getsentry/sentry-maven-plugin/issues/new/choose).

0 commit comments

Comments
 (0)