#Gradle, Ebean: Service loader didn't find a SpiContainerFactory?

12 messages · Page 1 of 1 (latest)

thick ruin
#

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:

plugins {
    id("io.ebean") version "15.8.0"
}

dependencies {
    implementation("com.mysql:mysql-connector-j:9.1.0")
    implementation("io.ebean:ebean:15.8.0")
    implementation("io.ebean:ebean-querybean:15.8.0")
    annotationProcessor("io.ebean:querybean-generator:15.8.0")
}

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:

plugins {
    id("io.ebean") version "15.8.0"
}

dependencies {
    implementation("com.mysql:mysql-connector-j:9.1.0")
    implementation("io.ebean:ebean-api:15.8.0") // fuer io.ebean.service.SpiContainer(Factory)
    implementation("io.ebean:ebean-platform-mysql:15.8.0")
    implementation("io.ebean:ebean-querybean:15.8.0")
    annotationProcessor("io.ebean:querybean-generator:15.8.0")
}

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)

hollow gyroBOT
#

This post has been reserved for your question.

Hey @thick ruin! Please use /close or the Close 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.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

spice bluff
thick ruin
spice bluff
thick ruin
#

Thanks!
I’ll give this a go later 😄

hollow gyroBOT
# thick ruin 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.

hollow gyroBOT
#

💤 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.

thick ruin
#

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

hollow gyroBOT
thick ruin
#

I was missing ebean-core and ebean-datasource facepalm