thilko / gradle-springdoc-plugin

Generate api documentation from mvc spring annotations
MIT License
10 stars 1 forks source link

InstantiationException #1

Closed kbucksch closed 10 years ago

kbucksch commented 10 years ago

Hey,

I like your plugin. Would be great to get it up and running. Currently I am having:

Caused by: java.lang.InstantiationException
    at com.thilko.springdoc.model.Response.asJson(Response.groovy:31)
    at com.thilko.springdoc.model.Response$asJson.call(Unknown Source)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24_closure29_closure32.doCall(SpringDoc.groovy:84)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24_closure29_closure32.doCall(SpringDoc.groovy)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24_closure29.doCall(SpringDoc.groovy:74)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24_closure29.doCall(SpringDoc.groovy)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24.doCall(SpringDoc.groovy:73)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21_closure24.doCall(SpringDoc.groovy)
    at com.thilko.springdoc.SpringDoc$_generate_closure1_closure4_closure5_closure6_closure8_closure18_closure19_closure20_closure21.doCall(SpringDoc.groovy:72)

Do you have any idea?

thilko commented 10 years ago

Hi, great you like it! Sorry for the late response, did not checked my mails. Currently, the support for response objects is a bit rough, I create them by reflection. That´s the reason why they need a parameterless constructor. Generics like ResponseEntity<ResponseObject> are handled, but ResponseEntity<Long>are a problem since there is no noarg constructor.

Briefly the response object currently has to be a concrete class with a noarg constructor.

I will definitly investigate here to produce a better error message and to improve the support for response objects.

thilko commented 10 years ago

I released version 0.2.0. Nothing really new here, but errors during the creation of the response object are catched and logged in order to identify the causing method. Could you give the new one a try?

thilko commented 10 years ago

I will close this ticket since this issue should be fixed, please open it again otherwise.