LeoAugust19 opened a new issue #858: 
org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2:  
java.lang.NoSuchMethodError caused by dependency conflicts due to 
org.yaml:snakeyaml:jar
URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858
 
 
   Hi, as shown in the dependency tree of 
**org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2**, only 
**org.yaml:snakeyaml:jar:1.16** can be loaded due to Maven version management. 
   
   However, method **<org.yaml.snakeyaml.DumperOptions: void 
setIndicatorIndent(int)>** only included in org.yaml:snakeyaml:jar:1.18. As a 
result, an exception will be thrown when your project invoking the missing 
method with the following stack trace.
   
   ### Stack trace
   Exception in thread "main" java.lang.NoSuchMethodError: 
org.yaml.snakeyaml.DumperOptions.setIndicatorIndent(I)V
        at 
com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.buildDumperOptions(YAMLGenerator.java:266)
        at 
com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.<init>(YAMLGenerator.java:232)
        at 
com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createGenerator(YAMLFactory.java:447)
        at 
com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createGenerator(YAMLFactory.java:397)
        at 
com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createGenerator(YAMLFactory.java:1)
        at 
com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:993)
        at 
org.apache.servicecomb.swagger.generator.core.unittest.UnitTestSwaggerUtils.pretty(UnitTestSwaggerUtils.java:71)
   
   ### Note
   If the conditon "**if(Feature.INDENT_ARRAYS.enableIn(_formatFeatures))**" 
satisfies in method bulidDumperOptions(), then the above crash will be 
triggered.
   
![2](https://user-images.githubusercontent.com/41102283/43671862-785cf566-97d4-11e8-8f56-d0eb8bc9e16a.png)
   
   
   
   ### Dependency tree
   org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2
   +- io.swagger:swagger-core:jar:1.5.12:compile
   |  +- org.apache.commons:commons-lang3:jar:3.3.2:compile (version managed 
from 3.2.1)
   |  +- org.slf4j:slf4j-api:jar:1.7.7:compile (version managed from 1.6.3)
   |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.5:compile 
(version managed from 2.8.4)
   |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile (version 
managed from 2.8.4)
   |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile
   |  +- 
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.5:compile 
(version managed from 2.8.4)
   |  |  +- **org.yaml:snakeyaml:jar:1.16:compile (version managed from 1.18)**
   |  |  \- (com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile - 
omitted for duplicate)
   |  +- io.swagger:swagger-models:jar:1.5.12:compile
   |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.5:compile - 
version managed from 2.8.4; omitted for duplicate)
   |  |  +- (org.slf4j:slf4j-api:jar:1.7.7:compile - version managed from 
1.6.3; omitted for duplicate)
   |  |  \- io.swagger:swagger-annotations:jar:1.5.12:compile
   |  +- com.google.guava:guava:jar:19.0:compile (version managed from 18.0)
   |  \- javax.validation:validation-api:jar:2.0.0.Final:compile (version 
managed from 1.1.0.Final)
   
   
   ### Solution
   Upgrade snakeyaml to 1.18
   
   Thanks a lot!
   
   Regards,
   Leo

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to