Skip to content

Commit

Permalink
docs: Add a page about service file conflict for überjars (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren authored May 31, 2024
1 parent 479cbe3 commit ccf6d51
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
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.

0 comments on commit ccf6d51

Please sign in to comment.