Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FusekiServerRunner does not load custom modules. #3046

Open
Aklakan opened this issue Mar 5, 2025 · 0 comments · May be fixed by #3049
Open

FusekiServerRunner does not load custom modules. #3046

Aklakan opened this issue Mar 5, 2025 · 0 comments · May be fixed by #3049
Labels

Comments

@Aklakan
Copy link
Contributor

Aklakan commented Mar 5, 2025

Version

5.4.0-SNAPSHOT

What happened?

I am trying to start a jena-fuseki-server bundle with the spatial indexer plugin added as a custom mod (org.apache.jena.fuseki.main.sys.FusekiAutoModule). However, it is not getting loaded (neither when added as a dependency nor as a separate jar file on the classpath). The jena-geosparql dependency initializes properly and prints out its log messages (uses org.apache.jena.sys.JenaSubsystemLifecycle).

I also tried starting as java -jar jena-fuseki-server-5.4.0-SNAPSHOT.jar --modules=true and launching FusekiServerRunner --modules=true directly from eclipse.

Recently, there has been #3001 - and if I am not mistaken, it's not fully fixed:

In FusekiServerRunner.java a set of default modules is registered:

FusekiModules serverModules = serverModules();
// Adjust the default settings of ServerArgs
FusekiServerArgsCustomiser initializeServerArgs = new FusekiServerArgsCustomiser() {
@Override
public void serverArgsModify(CmdGeneral fusekiCmd, ServerArgs serverArgs) {
serverArgs.allowEmpty = true;
serverArgs.fusekiModules = serverModules;
}
};

In FusekiMain.java, a check is made for whether modules have already been initialized. It detects the default modules and skips loading of custom modules.

// Allows for external setting of serverArgs.fusekiModules
if ( serverArgs.fusekiModules == null ) {
// Get modules from system-wide setup.
boolean withModules = hasValueOfTrue(argEnableModules);
if ( withModules )
serverArgs.fusekiModules = FusekiModules.getSystemModules();
}

I don't know how the logic is expected to work. Perhaps module loading needs to be split for fusekiModules (always present regardless of --modules setting) and customFusekiModules?

Relevant output and stacktrace

Are you interested in making a pull request?

Maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant