Closed frantuma closed 4 years ago
Are there any news on a timeline for this update?
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
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)
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)
things should work probably fine though
@frantuma it is not work fine because of NoSuchMethod error
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)
implemented in #3601 and #3574
Thanks @frantuma
Do we have an estimate when the fix will be released?
@xcv58 As I understand release date can be tracked here: https://github.com/swagger-api/swagger-core/milestone/37
@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
Looks better with 1.6.2-SNAPSHOT, but I have another unrelated issue now ;-)
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 https://github.com/xcv58/finatra-swagger/pull/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?
@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
Thanks @frantuma
You are correct, I will work with them to figure out how can we upgrade.
see