question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet springfox.documentation.spi.service.contexts.ParameterContext.getIgnorableParameterTypes()'

See original GitHub issue

Please take the time to search the repository, if your question has already been asked or answered.

  • What version of the library are you using? Is it the latest version? The latest released version is Download

3.3.0-SNAPSHOT

What kind of issue is this?

  • Question. Is this a question about how to do a certain thing?

  • Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests or steps to reproduce get fixed faster. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9

    • spring xml/java config that is relevant
    • springfox specific configuration if it makes sense
    • include any output you’ve received; logs, json snippets etc.; and what the expected output should be
    • if you have a repo that demonstrates the issue for bonus points! See this example

I’ve migrated JHipster to use Springfox 3.0.0-SNAPSHOT for its webflux support. On startup, I get the following errors:

2020-02-20 09:59:32.481 ERROR 68608 --- [  restartedMain] s.d.s.web.scanners.ApiDescriptionReader  : Skipping process path[/management/audits], method[getAll] as it has an error.

java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet springfox.documentation.spi.service.contexts.ParameterContext.getIgnorableParameterTypes()'
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createModelRefFactory(PageableParameterBuilderPlugin.java:211)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createPageParameter(PageableParameterBuilderPlugin.java:154)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.apply(PageableParameterBuilderPlugin.java:107)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsManager.operation(DocumentationPluginsManager.java:122)
        at springfox.documentation.spring.web.readers.operation.ApiOperationReader.read(ApiOperationReader.java:72)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.lambda$new$0(CachingOperationReader.java:43)
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.read(CachingOperationReader.java:48)
        at springfox.documentation.spring.web.scanners.ApiDescriptionReader.read(ApiDescriptionReader.java:72)
        at springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:153)
        at springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:69)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.scanDocumentation(AbstractDocumentationPluginsBootstrapper.java:97)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:83)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:94)
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:894)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.finishRefresh(ReactiveWebServerApplicationContext.java:129)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at io.github.jhipster.gateway.ReactiveGatewayApp.main(ReactiveGatewayApp.java:64)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

2020-02-20 09:59:32.504 ERROR 68608 --- [  restartedMain] s.d.s.web.scanners.ApiDescriptionReader  : Skipping process path[/management/audits], method[getByDates] as it has an error.

java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet springfox.documentation.spi.service.contexts.ParameterContext.getIgnorableParameterTypes()'
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createModelRefFactory(PageableParameterBuilderPlugin.java:211)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createPageParameter(PageableParameterBuilderPlugin.java:154)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.apply(PageableParameterBuilderPlugin.java:107)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsManager.operation(DocumentationPluginsManager.java:122)
        at springfox.documentation.spring.web.readers.operation.ApiOperationReader.read(ApiOperationReader.java:72)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.lambda$new$0(CachingOperationReader.java:43)
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.read(CachingOperationReader.java:48)
        at springfox.documentation.spring.web.scanners.ApiDescriptionReader.read(ApiDescriptionReader.java:72)
        at springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:153)
        at springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:69)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.scanDocumentation(AbstractDocumentationPluginsBootstrapper.java:97)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:83)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:94)
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:894)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.finishRefresh(ReactiveWebServerApplicationContext.java:129)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at io.github.jhipster.gateway.ReactiveGatewayApp.main(ReactiveGatewayApp.java:64)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

2020-02-20 09:59:32.801 ERROR 68608 --- [  restartedMain] s.d.s.web.scanners.ApiDescriptionReader  : Skipping process path[/api/users], method[getAllUsers] as it has an error.

java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableSet springfox.documentation.spi.service.contexts.ParameterContext.getIgnorableParameterTypes()'
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createModelRefFactory(PageableParameterBuilderPlugin.java:211)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.createPageParameter(PageableParameterBuilderPlugin.java:154)
        at io.github.jhipster.config.apidoc.PageableParameterBuilderPlugin.apply(PageableParameterBuilderPlugin.java:107)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsManager.operation(DocumentationPluginsManager.java:122)
        at springfox.documentation.spring.web.readers.operation.ApiOperationReader.read(ApiOperationReader.java:72)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.lambda$new$0(CachingOperationReader.java:43)
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
        at springfox.documentation.spring.web.scanners.CachingOperationReader.read(CachingOperationReader.java:48)
        at springfox.documentation.spring.web.scanners.ApiDescriptionReader.read(ApiDescriptionReader.java:72)
        at springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:153)
        at springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:69)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.scanDocumentation(AbstractDocumentationPluginsBootstrapper.java:97)
        at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:83)
        at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:94)
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:894)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.finishRefresh(ReactiveWebServerApplicationContext.java:129)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
        at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at io.github.jhipster.gateway.ReactiveGatewayApp.main(ReactiveGatewayApp.java:64)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

Here’s the methods its referring to:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
joewhite101commented, Aug 29, 2020

On the above I was missing one other change return new Docket(DocumentationType.OAS_30). That resolves the issue it seems. I’ll leave the above comment in place since it might help others. I’ve pushed the fix to the reproducer repo.

https://github.com/joewhite101/springfox-reproducer

0reactions
joewhite101commented, Sep 5, 2020

yeah it is resolved on master. Shows up in 6.10.1 but I think new patches are coming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoSuchMethodError: 'com.google.common.collect ...
The issue comes from conflicting Guava (transitive dependency) versions. It should be fixed with the WebDriverManager version 5.1.0.
Read more >
springfox.documentation.spi.schema.contexts.ModelContext
This page shows Java code examples of springfox.documentation.spi.schema.contexts.ModelContext.
Read more >
java.lang.NoSuchMethodError: com.google.common.collect ...
Hello, I am trying to write unit tests testing Active Objects. Following the tutorial here ...
Read more >
because the return value of "springfox.documentation.spi ...
Can someone help me with this issue. I tried following a tutorial but when I had to build the program I got this...
Read more >
java.lang.NoSuchMethodError: com.google.common ... - Redino
NoSuchMethodError : com.google.common.collect.ImmutableSet.toImmutableSet()Ljava/util/stream/Collector;. Following is full stacktrace.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found