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

Upgrade to Spring Boot 3.x.x #5063

Open
florianchappaz opened this issue Jun 28, 2024 · 5 comments
Open

Upgrade to Spring Boot 3.x.x #5063

florianchappaz opened this issue Jun 28, 2024 · 5 comments
Labels
📶 enhancement issue is a new feature or improvement

Comments

@florianchappaz
Copy link

Current Behavior

Running a project relying on Spring Boot v3.0.4, I'm getting this error when the RDF4JConfig attempts to build the RDF4JTemplate:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.eclipse.rdf4j.repository.Repository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

rdf4j spring components are built relying on Spring Boot v2.7.16, making them uncompatible with a Spring Boot v3 project.

Expected Behavior

I expected the @import(RDF4JConfig::class) to automatically build the Repository from my application.properties.

Steps To Reproduce

  1. Setup a Maven project based on
<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>3.0.4</version>
  <type>pom</type>
</parent>
  1. Follow the basic setup presented in rdf4j-spring, especially the setup of the application properties.

Version

5.0.0

Are you interested in contributing a solution yourself?

Perhaps?

Anything else?

It seems like the issue has already been mentioned in this discussion.

@florianchappaz florianchappaz added the 🐞 bug issue is a bug label Jun 28, 2024
@hmottestad hmottestad added 📶 enhancement issue is a new feature or improvement and removed 🐞 bug issue is a bug labels Jun 28, 2024
@hmottestad
Copy link
Contributor

RDF4J is compatible with spring-boot 2.7.16.

@hmottestad hmottestad changed the title rdf4j-spring uncompatible with Spring Boot 3 rdf4j-spring incompatible with Spring Boot 3 Jun 28, 2024
@fkleedorfer
Copy link
Contributor

@florianchappaz this may or may not be a compatibility issue. It may just be a configuration issue.

Have you tried using an inmemory repository?
The property to activate that is

rdf4j.spring.repository.inmemory.enabled=true

(and if you want: rdf4j.spring.repository.inmemory.use-shacl-sail=true )

@fkleedorfer
Copy link
Contributor

FYI, I aim to upgrade rdf4j-spring to support to the latest spring boot version in the not so distant future. I haven't looked into compatibility issues with spring boot 3 so far, but I would not expect it to work out of the box.

@florianchappaz
Copy link
Author

Issue Investigation

I've investigated the issue further and here are my findings:

  1. Using in-memory repository: Same error persists.

  2. VPN disabled:

    • My GraphDB instance is only accessible through VPN.
    • Disabling VPN resulted in the same error.
    • No connection resolution issues observed, suggesting the connection bean is never created and the config is ignored.
  3. No configuration:

    • Tried without any config, same error occurred.
    • Config appears to be ignored. Double-checked to ensure my config was correct.
  4. Downgrading project:

    • Downgraded to Spring Boot 2.7.16.
    • Result: No error.

Conclusion

The issue seems to be related to incompatibility with the newest Spring version.

If you need any additional information or assistance, please let me know.

@fkleedorfer
Copy link
Contributor

Thanks for your help diagnosing this! I will check back.

@hmottestad hmottestad changed the title rdf4j-spring incompatible with Spring Boot 3 Upgrade to Spring Boot 3.x.x Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📶 enhancement issue is a new feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants