Skip to content

Error in HateoasHalProvider while upgrade from 3.4.6 to 3.5.0 #45688

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

Closed
afattahi54 opened this issue May 26, 2025 · 1 comment
Closed

Error in HateoasHalProvider while upgrade from 3.4.6 to 3.5.0 #45688

afattahi54 opened this issue May 26, 2025 · 1 comment
Labels
for: external-project For an external project and not something we can fix

Comments

@afattahi54
Copy link

After upgrade from 3.4.6 to 3.5.0

pring-cloud.version is 2024.0.1


Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'modelConverterRegistrar' defined in class path resource [org/springdoc/core/configuration/SpringDocConfiguration.class]: Unsatisfied dependency expressed through method 'modelConverterRegistrar' parameter 0: Error creating bean with name 'collectionModelContentConverter' defined in class path resource [org/springdoc/core/configuration/SpringDocHateoasConfiguration.class]: Unsatisfied dependency expressed through method 'collectionModelContentConverter' parameter 0: Error creating bean with name 'hateoasHalProvider': Invocation of init method failed

***************************
APPLICATION FAILED TO START
***************************


An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springdoc.core.providers.HateoasHalProvider.isHalEnabled(HateoasHalProvider.java:81)

The following method did not exist:

    'boolean org.springframework.boot.autoconfigure.hateoas.HateoasProperties.getUseHalAsDefaultJsonMediaType()'

The calling method's class, org.springdoc.core.providers.HateoasHalProvider, was loaded from the following location:

    jar:file:/C:/Users/a_fattahi/.m2/repository/org/springdoc/springdoc-openapi-starter-common/2.8.8/springdoc-openapi-starter-common-2.8.8.jar!/org/springdoc/core/providers/HateoasHalProvider.class

The called method's class, org.springframework.boot.autoconfigure.hateoas.HateoasProperties, is available from the following locations:

    jar:file:/C:/Users/a_fattahi/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.5.0/spring-boot-autoconfigure-3.5.0.jar!/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.boot.autoconfigure.hateoas.HateoasProperties: file:/C:/Users/a_fattahi/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.5.0/spring-boot-autoconfigure-3.5.0.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springdoc.core.providers.HateoasHalProvider and org.springframework.boot.autoconfigure.hateoas.HateoasProperties


i have below in pom

   .....

        <spring-cloud.version>2024.0.1</spring-cloud.version>
        <spring-boot.version>3.5.0</spring-boot.version>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-hateoas</artifactId>
        </dependency>

  .....
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 26, 2025
@snicoll
Copy link
Member

snicoll commented May 26, 2025

@afattahi54 thanks for the report but that's the wrong place to do so. As indicated by the error report that you have shared, the call is from org.springdoc.core.providers.HateoasHalProvider which we don't manage.

This has already been reported at springdoc/springdoc-openapi#3005

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2025
@snicoll snicoll added for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

3 participants