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

PAYARA-2846 StackOverflowException in OpenAPI #2837

Merged
merged 1 commit into from Jun 15, 2018

Conversation

Projects
None yet
4 participants
@Pandrex247
Contributor

Pandrex247 commented Jun 13, 2018

Add check for classes with fields with a type of themselves to prevent infinite recursion

@Pandrex247 Pandrex247 added this to the Payara 5.183 milestone Jun 13, 2018

@Pandrex247 Pandrex247 requested a review from MattGill98 Jun 13, 2018

@Pandrex247

This comment has been minimized.

Show comment
Hide comment
@Pandrex247

Pandrex247 Jun 13, 2018

Contributor

In conjunction with #2827

Contributor

Pandrex247 commented Jun 13, 2018

In conjunction with #2827

@Pandrex247

This comment has been minimized.

Show comment
Hide comment
@Pandrex247

Pandrex247 Jun 15, 2018

Contributor

Jenkins test please

Contributor

Pandrex247 commented Jun 15, 2018

Jenkins test please

@payara-ci

This comment has been minimized.

Show comment
Hide comment
@payara-ci

payara-ci Jun 15, 2018

Contributor

Quick build and test passed!

Contributor

payara-ci commented Jun 15, 2018

Quick build and test passed!

@Pandrex247 Pandrex247 merged commit 387db18 into payara:master Jun 15, 2018

3 checks passed

Payara Quick Build Payara quick build passed!
Details
Payara Quick Build and Test Quick build and test passed!
Details
Payara Quick Test Payara quick tests passed!
Details

@Pandrex247 Pandrex247 deleted the Pandrex247:PAYARA-2846-OpenAPI-StackOverflowException branch Jun 15, 2018

Pandrex247 added a commit to Pandrex247/Payara that referenced this pull request Jun 15, 2018

Merge pull request payara#2837 from Pandrex247/PAYARA-2846-OpenAPI-St…
…ackOverflowException

PAYARA-2846 StackOverflowException in OpenAPI
@dantonepinto

This comment has been minimized.

Show comment
Hide comment
@dantonepinto

dantonepinto Jul 4, 2018

I updated my microprofile-openapi.jar with the ApplicationProcessor.class from the latest build of Payara Server 5.
A similar StackOverflowError is happening.
We can see the new createSchema method on the stack.

java.lang.StackOverflowError
        at java.lang.Class.getSimpleName(Class.java:1306)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:948)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)

dantonepinto commented Jul 4, 2018

I updated my microprofile-openapi.jar with the ApplicationProcessor.class from the latest build of Payara Server 5.
A similar StackOverflowError is happening.
We can see the new createSchema method on the stack.

java.lang.StackOverflowError
        at java.lang.Class.getSimpleName(Class.java:1306)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:948)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:897)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.createSchema(ApplicationProcessor.java:917)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitSchema(ApplicationProcessor.java:448)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.insertObjectReference(ApplicationProcessor.java:951)

@MattGill98

This comment has been minimized.

Show comment
Hide comment
@MattGill98

MattGill98 Jul 5, 2018

Contributor

Hi @dantonepinto,

Can you create a Github issue for this, along with a small reproducer?

Kind regards,

Matt

Contributor

MattGill98 commented Jul 5, 2018

Hi @dantonepinto,

Can you create a Github issue for this, along with a small reproducer?

Kind regards,

Matt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment