swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

An exception occurred during processing of the com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON class

Open SuperMarioX opened this issue 11 years ago • 6 comments

Using swagger + jaxrs and pom.xml is configed successfully.

  1. In myapp.java,
        services.add(com.wordnik.swagger.jaxrs.listing.ApiDeclarationProvider.class);
        services.add(com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON.class);
        services.add(com.wordnik.swagger.jaxrs.listing.ResourceListingProvider.class);
  1. in web.xml servelet config is configed as below.
 <servlet>
<servlet-name>TitanAppServiceSwaggerConfig</servlet-name>
<servlet-class>com.TitanAppServiceSwaggerConfig</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
  1. in my servlet class, using Beanconfig class config the swagger

While I run my app on liberty, I got this error and could not list the json.

[ERROR   ] An exception occurred during processing of the com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON class. This class is ignored.

Could anyone help me on this issue? Many thanks, :-)

SuperMarioX avatar May 28 '15 09:05 SuperMarioX

Which version of swagger-core do you use?

webron avatar May 28 '15 13:05 webron

2.10

SuperMarioX avatar May 28 '15 14:05 SuperMarioX

That's the scala version, but it also means you're using the 1.3.X branch.

I assume this is a new integration - you should use the 1.5 branch. The wiki contains a few guides for integration. Even though there isn't one for wink, the integration would be very similar to any of the other guides out there and the steps would be very simple (there's a wink sample in the develop_2.0 branch).

Try that and report back if you have any issues.

webron avatar May 28 '15 14:05 webron

Thanks webron. I have fixed this issue by following closely the guide without servlet. But while integrating with other similar projects, this issue remains if I choose servlet way. I am not sure, but I finally got a way to run it successfully.

SuperMarioX avatar May 28 '15 14:05 SuperMarioX

Well, there are some issues with Liberty but since that's a commercial product, we don't have access to it for testing.

One thing to keep in mind that since the same configuration works with other app server but not with Liberty, it's more likely that the issue is with Liberty itself.

Can we close the issue?

webron avatar May 28 '15 14:05 webron

Yes, Config swagger on liberty is a headache and always cause issues. But I think we will find a walkaround. Pls close it and many thanks.

SuperMarioX avatar May 28 '15 14:05 SuperMarioX