> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-build-tools-plugins/sealights-gradle-plugin-1/advanced-features-1.md).

# Troubleshooting

<table><thead><tr><th width="237.69140625">Issue</th><th width="221.05859375">Possible Cause</th><th>Resolution</th></tr></thead><tbody><tr><td><strong>JARs not found</strong></td><td>Incorrect paths to SeaLights JARs</td><td>Verify <code>sealightsBuildScannerJar</code> and <code>sealightsTestListenerJar</code> are correct and accessible</td></tr><tr><td><strong>Relative paths not working</strong></td><td>Paths resolved from project root</td><td>Ensure relative paths (e.g., <code>project/..</code>) are valid from the root project directory</td></tr><tr><td><strong>Tests are not instrumented</strong></td><td>Tests are not running in forked JVM</td><td>Ensure <code>fork := true</code> is set for test tasks and not overridden later</td></tr><tr><td><strong>No coverage reported</strong></td><td>Test Listener not running or misconfigured</td><td>Verify Test Listener is correctly configured and tests are executed</td></tr><tr><td><strong>Build succeeds but no data in SeaLights</strong></td><td>Missing or incorrect Build Session ID</td><td>Ensure Build Scanner ran successfully before tests</td></tr><tr><td><strong><code>testsonly</code> mode</strong></td><td>No previous scan exists</td><td>Run a full build or <code>scanonly</code> first to generate a Build Session ID</td></tr><tr><td><strong>SeaLights disabled unexpectedly</strong></td><td><code>sealightsDisabled</code> flag enabled</td><td>Check <code>sealightsDisabled := Some(true)</code> or <code>-DsealightsDisabled=true</code></td></tr><tr><td><strong>Plugin tasks not executed</strong></td><td>Incorrect SBT command or plugin not loaded</td><td>Verify plugin is added in <code>project/plugins.sbt</code> and run <code>sbt tasks</code> to confirm</td></tr><tr><td><strong>CI builds behave differently</strong></td><td>Environment differences (paths, permissions)</td><td>Verify JAR paths, config file location, and environment variables in CI</td></tr><tr><td><strong>Connection issues to SeaLights</strong></td><td>Network or proxy configuration</td><td>Ensure outbound connectivity and configure JVM proxy settings if needed</td></tr></tbody></table>

### Debugging Tips

#### Enable Debug Logging

Run the Build Scanner with debug logs:

```bash
java -jar sl-build-scanner.jar -sbt -configfile ./sl-config.json -logLevel debug -workspacepath ./my-project
```

#### Verify Build Scanner Execution

Make sure the Build Scanner runs successfully before tests:

* Check logs for Build Session ID generation
* Ensure no errors during scan phase

#### Verify Test Execution Flow

Confirm that:

* tests are actually executed
* tests run in forked JVMs
* Test Listener is attached

#### Validate Configuration

Double-check:

* `sl-config.json` path
* JAR locations
* execution mode (`scanonly`, `testsonly`, `full`)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-build-tools-plugins/sealights-gradle-plugin-1/advanced-features-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
