2
respostas

[Bug] Estou recebendo esse erro ao exibir a tradução!

024-05-02T17:54:36.541-03:00  INFO 2652 --- [screenmatch] [           main] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-05-02T17:54:36.600-03:00 ERROR 2652 --- [screenmatch] [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

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

Description:

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

    com.fasterxml.jackson.databind.ObjectWriter.writeValueAsBytes(ObjectWriter.java:1172)

The following method did not exist:

    'void com.fasterxml.jackson.core.util.BufferRecycler.releaseToPool()'

The calling method's class, com.fasterxml.jackson.databind.ObjectWriter, was loaded from the following location:

    jar:file:/C:/Users/Everaldo/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.17.0/jackson-databind-2.17.0.jar!/com/fasterxml/jackson/databind/ObjectWriter.class

The called method's class, com.fasterxml.jackson.core.util.BufferRecycler, is available from the following locations:

    jar:file:/C:/Users/Everaldo/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.15.4/jackson-core-2.15.4.jar!/com/fasterxml/jackson/core/util/BufferRecycler.class

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

    com.fasterxml.jackson.core.util.BufferRecycler: file:/C:/Users/Everaldo/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.15.4/jackson-core-2.15.4.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.fasterxml.jackson.databind.ObjectWriter and com.fasterxml.jackson.core.util.BufferRecycler

Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodError: 'void com.fasterxml.jackson.core.util.BufferRecycler.releaseToPool()'
    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:825)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:344)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
    at br.com.everaldoboscatto.screenmatch.ScreenmatchApplication.main(ScreenmatchApplication.java:12)
Caused by: java.lang.NoSuchMethodError: 'void com.fasterxml.jackson.core.util.BufferRecycler.releaseToPool()'


Process finished with exit code 1
2 respostas

Pessoal, resolvido!

Alterei a versão do jackson para 2.15.2, aí resolveu.

<dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.15.2</version>
        </dependency>

Olá Everaldo, tudo bem com você?

Fico feliz em saber que conseguiu solucionar o erro apresentado de incompatibilidade entre as versões das bibliotecas Jackson que estava sendo utilizada no projeto. O erro indicava que a versão da biblioteca estava tentando usar um método que não existe na versão carregada durante a execução.

Esse retorno seu informando como solucionou é muito importante para auxiliar os estudantes que estão recebendo o mesmo erro.

Conte com o apoio do Fórum na sua jornada. Abraços e bons estudos!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software