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

Swagger is not working correctly in specific case ( ArrayIndexOutOfBoundsException: 0 ) #4044

Closed
3 tasks done
wonizz opened this issue Dec 16, 2022 · 3 comments
Closed
3 tasks done
Labels

Comments

@wonizz
Copy link

wonizz commented Dec 16, 2022

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?
    3.0.0

  • 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

    • include any output you've received; logs, json snippets etc.; and what the expected output should be
Logs

2022-12-16 16:47:21.928 ERROR 1 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Unable to scan documentation context default

java.lang.ArrayIndexOutOfBoundsException: 0
at org.springframework.core.MethodParameter.getParameterName(MethodParameter.java:718)
at springfox.documentation.spring.web.readers.operation.HandlerMethodResolver.discoveredName(HandlerMethodResolver.java:245)
at springfox.documentation.spring.web.readers.operation.HandlerMethodResolver.lambda$toParameters$1(HandlerMethodResolver.java:166)
at java.util.Optional.map(Optional.java:215)
at springfox.documentation.spring.web.readers.operation.HandlerMethodResolver.methodParameters(HandlerMethodResolver.java:82)
at springfox.documentation.spring.web.WebFluxRequestHandler.getParameters(WebFluxRequestHandler.java:139)
at springfox.documentation.spi.service.contexts.RequestMappingContext.getParameters(RequestMappingContext.java:195)
at springfox.documentation.spi.service.contexts.Orderings.methodParametersSignature(Orderings.java:82)
at springfox.documentation.spi.service.contexts.Orderings.qualifiedMethodName(Orderings.java:77)
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.util.TimSort.sort(TimSort.java:220)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:348)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at springfox.documentation.spring.web.scanners.ApiListingScanner.sortedByMethods(ApiListingScanner.java:229)
at springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:152)
at springfox.documentation.spring.web.scanners.ApiDocumentationScanner.scan(ApiDocumentationScanner.java:67)
at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.scanDocumentation(AbstractDocumentationPluginsBootstrapper.java:96)
at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:82)
at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:100)
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:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:62)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.linecorp.link.escrow.data.LinkEscrowDataApplicationKt.main(LinkEscrowDataApplication.kt:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:109)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)

When does that happen and what is the solution for this?

@sreenath-tm
Copy link

Hi I would like to work on this issue can you let me know how i can solve this issue.

@stale
Copy link

stale bot commented May 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 9, 2023
@stale
Copy link

stale bot commented Jun 10, 2023

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

@stale stale bot closed this as completed Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants