Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add a page about service file conflict for überjars #578

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/main/paradox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The Akka Persistence R2DBC plugin allows for using SQL database with R2DBC as a
* [Migration tool](migration.md)
* [Migration Guide](migration-guide.md)
* [Native Image](native-image.md)
* [Troubleshooting](troubleshooting.md)
* [Contributing](contributing.md)

@@@
Expand Down
17 changes: 17 additions & 0 deletions docs/src/main/paradox/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Troubleshooting

## Failing to use the configured plugin

If you see something like this, where the driver is not available:

```
Unable to create a ConnectionFactory for 'ConnectionFactoryOptions{options={...}}'. Available drivers: [ pool ]
```

It is likely because you are building a shaded jar with all dependencies and the ´META-INF/services` entry for
the R2DBC driver for the database you are using got lost.

If using maven shading plugin, make sure to use the [ServicesResourceTransformer](https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer).

For other build tools, make sure the tool merges `META-INF/services/io.r2dbc.spi.ConnectionFactoryProvider`
files rather than dropping one when there is a conflict.