Gradle, Ebean: Service loader didn't find a SpiContainerFactory?
Hey, I'm having a problem with Ebean at the moment and hope someone here is able to help.
It's the first time I'm using Gradle and the first time I'm using Ebean in private, so sorry if there's any obvious mistakes.
This is the config I had using the "Getting Started" documentation:
Then I got an error message stating I should use driver specific packages (since Ebean 13+), which wasn't documented for gradle, so I checked out the Maven page and came up with this:
Now I'm getting an error about
SpiContainerFactory
not being found, even though the class is part of my jar.
DatabaseProvider: https://paste.helpch.at/igogeyiraf.java
Error: https://paste.helpch.at/dihajofopi.rb (also without shading)10 Replies
⌛
This post has been reserved for your question.
Hey @Aze! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Hello, do you know how the SPI works?
Providing a class in your jar is just one part. As a second part, you have to configure META-INF/services to inform java about your class...
No, I never had to deal with that before
Are you able to recommend some resource I can use to read up on that topic?
I hope I will not get banned by posting this link 🙂
https://www.baeldung.com/java-spi
Baeldung
Java Service Provider Interface | Baeldung
Have a look at the components of the Java Service Provider Interface with a practical use case.
Thanks!
I’ll give this a go later 😄
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Again thanks for the link, but I feel like this is not the proper approach for the issue I'm facing, perhaps I'm just misunderstanding this.
So what I took from the website is that I'd have to create some META-INF files, but they would all point to library internal files, since I'm not actually the one provisioning the SpiContainer stuff?
The ebean docs also don't mention any of this stuff afaik
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
I was missing ebean-core and ebean-datasource :facepalm:
Post Closed
This post has been closed by <@398509167351955456>.