serviceloader Questions

1

Solved

JPMS ServiceLoader does not work for me as expected. I am trying to provide a desktop program as an executable jar with a default service, that can be overloaded by the individual user. A user prov...
Toothbrush asked 7/8, 2021 at 10:57

0

I'm obfuscating/optimizing an app and a set of plugin/libraries (using ServiceLoader) via maven. The plugins are only created/maintained in the same code base as the app, it's not an interface inte...
Sterigma asked 6/7, 2021 at 17:27

2

Solved

I am getting this error message when I try to compile my new modularized Java 11 application: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive mo...

1

Solved

I would like to be able to indicate an enum type as an interface implementation and then load all enums as separate instances/implementations of the interface via the ServiceLoader API. An example ...
Fredericton asked 16/2, 2019 at 4:0

2

I have a library method that can be used to connect to a database and then build a document using data from the database. When they run this app with no parameters, I want to list out all availabl...
Clyte asked 5/1, 2020 at 19:37

1

I just read about Java 9 module system and I'd like to ask about ServiceLoader. Is there any way how to add service implementation when the application is already started? How about removing some s...
Garrott asked 4/4, 2018 at 7:2

3

I came across the documentation of ServiceLoader and am unclear as to what use cases it suits. When would one use ServiceLoader?
Futures asked 6/9, 2018 at 12:59

0

We have been trying to get SPI Fly to work with openstack4j-core and one of the openstack4j connectors (openstack4j-httpclient). It is org.openstack4j.core.transport.HttpExecutorService that requir...
Barbital asked 7/2, 2018 at 23:12

1

Solved

I'm trying to understand the Java ServiceLoader concepts, working mechanism and concrete use cases, but find the official documentation too abstract and confusing. First of all, documentation outl...
Adriannaadrianne asked 29/7, 2017 at 9:4

3

Solved

I'm trying to create a plugin system for my application, and I want to start with something simple. Every plugin should be packed in a .jar file and implement the SimplePlugin interface: package p...
Dambro asked 19/4, 2013 at 9:58

1

I have the following gradle build config: plugins { id 'com.github.johnrengelman.shadow' version '1.2.3' } group 'abc' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'application' mai...
Stoops asked 16/6, 2017 at 17:44

5

This is more a general question by example: I'm using xstream and woodstox, woodstox comes with a service provider for javax.xml.stream.XMLOutputFactory in woodstox jar registering com.ctc.wstx.sta...
Microcircuit asked 23/7, 2013 at 10:5

2

Solved

Have been trying this since few days and can't get it working! I am trying to build a pluggable java application where I can run it from command line and provide plugins (jars) in a separated fold...
Joggle asked 27/10, 2016 at 12:18

3

Solved

I tried to use the Java ServiceLoader to find all classes that implement a specific interface like so: loader = ServiceLoader.load(Operation.class); try { for (Operation o : loader) { operations...
Twitch asked 24/4, 2012 at 18:44

1

Solved

I really did a lot of research before asking this, it seems like I'm missing something. I try to implement a ServiceLoader and therefore made an example class: the code is simple: testInterface...
Mariano asked 29/10, 2015 at 22:8

0

I am very new to Java (coming from C# .NET background). Trying to create an "expansion/IoC" style architecture via a combination of Google Guice and ServiceLoader, but can't seem to get the Service...
Caning asked 11/3, 2015 at 10:23

4

Solved

I have a legacy Java application that has code something like this ServiceLoader.load(SomeInterface.class) and I want to provide a mock implementation of SomeInterface for this code to use. I us...
Ellerey asked 2/3, 2015 at 8:49

3

Solved

I'm looking for something like the ServiceLoader, but which does not depend on SPI file, where all the service implementations should be enumerated and then added to the path of some class loader, ...
Covariance asked 7/7, 2010 at 11:39

1

I am trying to find out if there is a Spring analogue of the ServiceLoader class which is part of the standard SDK's API. If there is such a class how is it used? Please advise!
Ansley asked 16/6, 2014 at 16:13

5

I am very new to java and android development and to learn I am trying to start with an application to gather statistics and information like munin does. I am trying to be able to load "plugins" in...
Lightness asked 22/4, 2011 at 22:17

1

I am trying to put together a basic SPI-based registry of Handlers, which I lookup from a HandlerRegistry. When I use the ServiceLoader.load(Handler.class) to initialize the providers, and then ite...
Hooker asked 7/8, 2013 at 13:46

1

Solved

I have a custom charset which is already working on JavaSE. The class of my CharsetProvider is specified in a file java.nio.charset.spi.CharsetProvider which is located in META-INF/services and ev...
Darksome asked 3/6, 2013 at 13:52

1

Solved

I'm asking because I'm totally not sure I've done the right thing. I'm using Eclipse for a web project. Let's call it WebProject (duh) in the package com.web.project. I want WebProject to load JAR...
Herringbone asked 30/4, 2013 at 8:5

1

I have a web application that defines a Hibernate Integrator as part of the Java ServiceLoader specification like so: src/main/resources/META-INF/services/org.hibernate.integrator.spi.Integrator ...
Unimposing asked 19/4, 2013 at 12:38

1

I have been trying to refactor our Activiti implementation into using CDI but ran into a number of problems. I've spent way too much time trying to resolve this already, but I just can't let it go....
Fondle asked 30/10, 2012 at 15:43

© 2022 - 2024 — McMap. All rights reserved.