[Bug]: Module Resource Files Not Found When Using FileSystemHelper.readJson #552
Labels
bug
Something isn't working
needs triage
This issue needs to be investigated and confirmed as a valid
Is there an existing issue for this?
Current Behavior
When using the
io.neonbee.internal.helper.FileSystemHelper.readJson
method to load resource files within a NeonBee module, the resource file cannot be found. This occurs because theFileSystemHelper.readJson
method relies on Vert.x's internal file resolver, which uses the application ClassLoader. The application ClassLoader is only aware of resource files within the NeonBee core, not those in the module's resources.Expected Behavior
The
FileSystemHelper.readJson
method should be able to locate and load resource files from within the module’s resources when called from a NeonBee module.Steps To Reproduce
Environment
- NeonBee: 0.37.0
Relevant log output
No response
Anything else?
A workaround involves manually loading the resource file using the module's ClassLoader, as shown in the following code snippet:
The text was updated successfully, but these errors were encountered: