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

update jackson to latest 2.11.1+ #3554

Closed
frantuma opened this issue May 7, 2020 · 14 comments
Closed

update jackson to latest 2.11.1+ #3554

frantuma opened this issue May 7, 2020 · 14 comments
Assignees
Milestone

Comments

@frantuma
Copy link
Member

frantuma commented May 7, 2020

see

@frantuma frantuma self-assigned this May 7, 2020
@Xexanos
Copy link

Xexanos commented May 18, 2020

Are there any news on a timeline for this update?

@frantuma
Copy link
Member Author

no fixed ETA, probably within next release; things should work probably fine though with 2.11.1+ if you define version in your POM / build system

@nhenneaux
Copy link

I have tested using jackson 2.11.0 on our project and it was failing since a deprecated method was removed.

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType(Lcom/fasterxml/jackson/databind/type/TypeBindings;)Lcom/fasterxml/jackson/databind/JavaType;
	at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:424)
	at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:202)

@qwazer
Copy link

qwazer commented May 18, 2020

The same issue when use swagger-core-1.6.1 and jackson-databind-2.11.0.jar

Caused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.JavaType com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType(com.fasterxml.jackson.databind.type.TypeBindings)'
	at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:425) ~[swagger-core-1.6.1.jar:1.6.1]
	at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:203) ~[swagger-core-1.6.1.jar:1.6.1]
***************************
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:
    io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:425)
The following method did not exist:
    'com.fasterxml.jackson.databind.JavaType com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType(com.fasterxml.jackson.databind.type.TypeBindings)'
The method's class, com.fasterxml.jackson.databind.introspect.AnnotatedMember, is available from the following locations:
    jar:file:/home/ar/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0.jar!/com/fasterxml/jackson/databind/introspect/AnnotatedMember.class
It was loaded from the following location:
    file:/home/ar/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.0/jackson-databind-2.11.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.fasterxml.jackson.databind.introspect.AnnotatedMember
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.0.RELEASE)

@qwazer
Copy link

qwazer commented May 18, 2020

things should work probably fine though

@frantuma it is not work fine because of NoSuchMethod error

@frantuma
Copy link
Member Author

frantuma commented Jun 3, 2020

This is waiting for feedback on jackson PR; after that is clarified this can be implemented in master by updating version (and fixing quoting in tests if there is no progress in jackson PR), and in 1.5 version,by updating deprecated calls member.getType(beanDesc.bindingsForBeanType()); with member.getType(); in ModelResolver (and fixing quoting in tests if there is no progress in jackson PR)

frantuma added a commit that referenced this issue Jun 3, 2020
This was referenced Jun 3, 2020
@frantuma frantuma modified the milestones: M3, M4 Jun 22, 2020
frantuma added a commit that referenced this issue Jun 26, 2020
frantuma added a commit that referenced this issue Jun 26, 2020
frantuma added a commit that referenced this issue Jun 26, 2020
frantuma added a commit that referenced this issue Jun 26, 2020
@frantuma
Copy link
Member Author

implemented in #3601 and #3574

@xcv58
Copy link

xcv58 commented Jun 26, 2020

Thanks @frantuma

Do we have an estimate when the fix will be released?

@qwazer
Copy link

qwazer commented Jun 29, 2020

@xcv58 As I understand release date can be tracked here: https://github.com/swagger-api/swagger-core/milestone/37

@frantuma
Copy link
Member Author

@qwazer this is not correct, at least at the moment we are not cutting a release at the end of milestones; that said, 2.1.3 was released on June 27th

@blop
Copy link
Contributor

blop commented Jun 29, 2020

Looks better with 1.6.2-SNAPSHOT, but I have another unrelated issue now ;-)

@xcv58
Copy link

xcv58 commented Jun 29, 2020

Hi @frantuma

I upgrade to the latest swagger-core@2.1.3 and Jackson@2.11.1. However, there is still the same error:

Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.introspect.AnnotatedMember.getType(Lcom/fasterxml/jackson/databind/type/TypeBindings;)Lcom/fasterxml/jackson/databind/JavaType;
        at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:425)
        at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:203)

It can be reproduced via xcv58/finatra-swagger#1

All dependencies are defined here:
https://github.com/xcv58/finatra-swagger/blob/8572a0637fcd9519345a3730ae3b1a33319236db/build.sbt#L29-L37

I'm not sure it's the same bug or a different one. Could you please take a look?

@frantuma
Copy link
Member Author

frantuma commented Jul 1, 2020

@xcv58 from the stack trace and looking at your code, you are using swagger 1.x (1.5 branch) and not 2.x (master branch); I guess you're picking up the version transitively from swagger-scala-module, which is not the latest (supporting Jackson 2.11.1); you should add a dependency to latest io.swagger:swagger-core 1.x version 1.6.2

@xcv58
Copy link

xcv58 commented Jul 2, 2020

Thanks @frantuma

You are correct, I will work with them to figure out how can we upgrade.

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

No branches or pull requests

6 participants