Forum Discussion

kwalsh's avatar
kwalsh
New Contributor
8 years ago

java.lang.stackoverflowerror When creating a project from a swagger specification

I'm trying to create a project from a swagger specification that was generated via Swashbuckle.  When I import the swagger definition though, I get an error message saying java.lang.stackoverflowerror, and nothing else.  If I click "Ok", the project gets created successfully, however, not all of the REST calls seem to get imported into the project - it stops about halfway.

 

I'm unsure whether the swagger spec itself is corrupted somehow, or if Ready API is simply running out of memory.  I tried modifying the vmoptions file for ReadyAPI to these respective values:

 

-Xms2048m
-Xmx4096m

 

But it did not fix the problem.  Any suggestions?  I don't think I can upload the swagger spec here for you guys to look at as it is company code, but ideas of what to look for that could be wrong in it are welcome.  

2 Replies

  • kwalsh's avatar
    kwalsh
    New Contributor

    It looks like this error is related to API calls that reference objects that have variables that are two dimensional arrays.  An example of this would be:

     

     

        "ResultSet": {
          "type": "object",
          "properties": {
            "Rows": {
              "type": "array",
              "items": {
                "type": "array",
                "items": { "type": "object" }
              }
            }
          }
        }

     

    I'm going to go ahead and open up a bug with SmartBear and see where it goes.