Aze
Aze
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by Aze on 11/1/2024 in #java-help
Gradle, Ebean: Service loader didn't find a SpiContainerFactory?
I was missing ebean-core and ebean-datasource :facepalm:
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 11/1/2024 in #java-help
Gradle, Ebean: Service loader didn't find a SpiContainerFactory?
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
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 11/1/2024 in #java-help
Gradle, Ebean: Service loader didn't find a SpiContainerFactory?
Thanks! I’ll give this a go later 😄
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 11/1/2024 in #java-help
Gradle, Ebean: Service loader didn't find a SpiContainerFactory?
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?
13 replies
DDeno
Created by Aze on 9/29/2024 in #help
Missing express types
I settled on oak now, I consider this solved.
6 replies
DDeno
Created by Aze on 9/29/2024 in #help
Missing express types
I tried that now and did a deno cache --reload npm:@types/express npm:express, but unfortunately this doesn't seem to work properly. Do you reckon a web framework like oak or hono would work better, since it's uploaded on jsr?
6 replies
DDeno
Created by Aze on 9/29/2024 in #help
Missing express types
Is the npm prefix necessary even if I did a deno add npm:@types/express?
6 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 5/3/2024 in #java-help
Annotations - interface as attribute type
I guess that makes sense kind of sad, now I have to rethink what I had planned Appreciate the help!
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 5/3/2024 in #java-help
Annotations - interface as attribute type
When the interface is applied to an enum it would be a constant too, no? If I drop the interface and implement the method straight into the enum it works
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 5/3/2024 in #java-help
Annotations - interface as attribute type
Right, I understand the value has to be a constant, but in my example the interface is implemented by an enum, and I know interfaces can also be implemented by normal classes, like in you example. But since enums can implement interfaces, why disallow it completely?
13 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 1/30/2024 in #java-help
Supplier alternative
private <T> void enable(String name, Class<T> clazz, Consumer<T> consumer) {
if (isEnabled(name)) return;

try {
T instance = clazz.getDeclaredConstructor().newInstance();
consumer.accept(instance);
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
}
private <T> void enable(String name, Class<T> clazz, Consumer<T> consumer) {
if (isEnabled(name)) return;

try {
T instance = clazz.getDeclaredConstructor().newInstance();
consumer.accept(instance);
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
}
same issue
8 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 1/30/2024 in #java-help
Supplier alternative
It seems the function gets executed immediately, and the get method only returns the result. Is there an alternative that only executes the function on method call?
8 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 10/17/2022 in #java-help
Nitrite Database
would you mind going more into detail? I'm pretty new to Java and Databases
12 replies
JCHJava Community | Help. Code. Learn.
Created by Aze on 10/17/2022 in #java-help
Nitrite Database
well, the issue is resolved now after speaking to the maintainer of Nitrite
12 replies