-
Notifications
You must be signed in to change notification settings - Fork 306
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
Bug Report: duplicateKeyException in OpenAPI after upgrade to Payara 6.2023.6 / FISH-7965 #6369
Comments
Hi @marcinpaton, would you be able to test this in the latest version of Payara? |
hi, I've tested it on 6.2023.9 and the problem still exists. |
Hi @marcinpaton, Can you provide more details on how to reproduce this issue? I have deployed the following application https://github.com/payara/Payara-Examples/tree/Payara6/microprofile/openapi-example and I am unable to reproduce this issue. |
Greetings, |
hi, ok I will try to reproduce the issue in this sample application this or next week |
Greetings, |
Hi @kalinchan
|
Hi @marcinpaton, Many thanks for providing the reproducer, I was able to reproduce the issue and I have escalated this to the platform development team as Thank you, |
@kalinchan @Elifzeynepedman hi! I'm glad you're able to reproduce the bug thanks to @marcinpaton. Any news on Thanks for Payara! It's a great product! ❤️ |
This issue is affecting all the applications across my teams as well. Unfortunately, we've not found a workaround yet. I've opened PR #6563 with @marcinpaton's suggested solution. Local testing confirms this change addresses the issue for our applications. Feel free to let me know if there's anything I can help with this one. Thanks! |
Brief Summary
After upgrade Payara from 6.2023.4 to 6.2023.6 we're getting exception from OpenAPI:
Function TypesCtr.getAllTypes() which is used in OpenAPISupplier.typesToMap may return collection of duplicated classes so Collectors.toMap throws exception.
Probably merge function should be used in Collectors.toMap. Ex. :
Expected Outcome
No exception
Current Outcome
Exception:
StandardWrapperValve[microprofile-openapi-servlet]: Servlet.service() for servlet microprofile-openapi-servlet threw exception
java.lang.IllegalStateException: Duplicate key net.bytebuddy.implementation.bind.annotation.Argument (attempted merging values AnnotationTypeImpl{name='net.bytebuddy.implementation.bind.annotation.Argument', annotations=[ java.lang.annotation.Documented java.lang.annotation.Retention java.lang.annotation.Target], subclasses=[], parent=null, interfaces=[], implementors=[], referenced from [ ParameterImpl{null} ParameterImpl{null}]} and InterfaceModelImpl{name='net.bytebuddy.implementation.bind.annotation.Argument', annotations=[], subclasses=[], parent=null, interfaces=[], implementors=[ net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder$DelegationProcessor$Handler$Unbound$DefaultArgument]})
at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at fish.payara.microprofile.openapi.impl.OpenAPISupplier.typesToMap(OpenAPISupplier.java:198)
at fish.payara.microprofile.openapi.impl.OpenAPISupplier.collectTypesFromArchive(OpenAPISupplier.java:192)
at fish.payara.microprofile.openapi.impl.OpenAPISupplier.get(OpenAPISupplier.java:126)
at fish.payara.microprofile.openapi.impl.OpenApiService.getDocument(OpenApiService.java:149)
at fish.payara.microprofile.openapi.impl.rest.app.service.OpenApiResource.getResponse(OpenApiResource.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Reproducer
Operating System
Ubuntu 20.04.6 LTS
JDK Version
openjdk 11.0.19 2023-04-18 LTS
Payara Distribution
Payara Server Full Profile
The text was updated successfully, but these errors were encountered: