[
https://issues.apache.org/jira/browse/AMBARI-25870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kengo Seki updated AMBARI-25870:
--------------------------------
Status: Patch Available (was: Open)
> Upgrade Swagger to 1.6.2+ for avoiding NoSuchMethodError
> --------------------------------------------------------
>
> Key: AMBARI-25870
> URL: https://issues.apache.org/jira/browse/AMBARI-25870
> Project: Ambari
> Issue Type: Bug
> Reporter: Kengo Seki
> Assignee: Kengo Seki
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, running unit tests for ambari-utility fails with the following
> error.
> {code}
> $ mvn clean test -f ambari-utility/pom.xml
> ...
> [ERROR] Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.656
> s <<< FAILURE! - in org.apache.ambari.swagger.AmbariSwaggerReaderTest
> ...
> [ERROR] Errors:
> [ERROR]
> AmbariSwaggerReaderTest.swaggerApiThatIsBothTopLevelAndNestedIsCountedAsTopLevel:171
> » NoSuchMethod
> [ERROR] AmbariSwaggerReaderTest.swaggerBasicCase:71 » NoSuchMethod
> com.fasterxml.jacks...
> [ERROR] AmbariSwaggerReaderTest.swaggerConflictingNestedApis:86 »
> NoSuchMethod com.fas...
> [ERROR]
> AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithBadPreferredParent:140
> » NoSuchMethod
> [ERROR]
> AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithPreferredParent:103 »
> NoSuchMethod
> [ERROR]
> AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithSamePreferredParent:121
> » NoSuchMethod
> [ERROR] AmbariSwaggerReaderTest.swaggerNestedApisWithOverwrite:156 »
> NoSuchMethod com....
> [INFO]
> [ERROR] Tests run: 10, Failures: 0, Errors: 7, Skipped: 1
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> {code}
> This is because the old version of Swagger uses Jackson's {{getType}} method
> internally, [which is deprecated and removed in
> v2.9|https://fasterxml.github.io/jackson-databind/javadoc/2.8/com/fasterxml/jackson/databind/introspect/Annotated.html#getType(com.fasterxml.jackson.databind.type.TypeBindings)],
> while [we are using Jackson
> v2.12|https://github.com/apache/ambari/blob/trunk/ambari-project/pom.xml#L44-L45].
> Upgrading Swagger to 1.6.2 or greater fixes this problem, just like the
> following case.
> https://github.com/swagger-api/swagger-core/issues/3554#issuecomment-652366376
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]