Skip to content

fix: load SPARQL templates from classpath in packaged backend#73

Merged
spah-soptim merged 1 commit intomainfrom
fix/sparql-template-loader
Apr 10, 2026
Merged

fix: load SPARQL templates from classpath in packaged backend#73
spah-soptim merged 1 commit intomainfrom
fix/sparql-template-loader

Conversation

@spah-soptim
Copy link
Copy Markdown
Member

The loader was calling ClassPathResource#getFile(), which which only works when the resource exists as a real filesystem file. In a packaged jar it becomes a nested classpath resource, so getFile() throws a FileNotFoundException.

The loader was calling ClassPathResource#getFile(), which which only works when the resource exists as a real filesystem file. In a packaged jar it becomes a nested classpath resource, so getFile() throws a FileNotFoundException.
@spah-soptim spah-soptim requested a review from kiph-soptim April 10, 2026 14:50
Copy link
Copy Markdown
Collaborator

@kiph-soptim kiph-soptim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spah-soptim spah-soptim merged commit 9f6938d into main Apr 10, 2026
6 checks passed
@spah-soptim spah-soptim deleted the fix/sparql-template-loader branch April 10, 2026 15:12
kiph-soptim pushed a commit that referenced this pull request Apr 14, 2026
The loader was calling ClassPathResource#getFile(), which which only works when the resource exists as a real filesystem file. In a packaged jar it becomes a nested classpath resource, so getFile() throws a FileNotFoundException.
kiph-soptim pushed a commit that referenced this pull request Apr 15, 2026
The loader was calling ClassPathResource#getFile(), which which only works when the resource exists as a real filesystem file. In a packaged jar it becomes a nested classpath resource, so getFile() throws a FileNotFoundException.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants