> 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

This section covers common issues when working with the SeaLights SBT plugin and how to resolve them.

<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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
