Swagger Integration Error!

346 views
Skip to first unread message

Buland Malik

unread,
Mar 22, 2014, 2:18:07 PM3/22/14
to swagger-sw...@googlegroups.com
Hi -

I am trying to integrate Swagger with my project in Mule. I am trying to add the integration with Swagger dynamic JSOn creation approach. I am getting teh following error and after sopending couple of hours on goggle I gave up as nothing much found from there so reaching out here to see if someone can tell me what could cause the below error: -

SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
  SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.wordnik.swagger.jaxrs.listing.ApiListingResource.apiDeclaration(java.lang.String,javax.ws.rs.core.Application,javax.servlet.ServletConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 2
  SEVERE: Method, public javax.ws.rs.core.Response com.wordnik.swagger.jaxrs.listing.ApiListingResource.apiDeclaration(java.lang.String,javax.ws.rs.core.Application,javax.servlet.ServletConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of resource, class com.wordnik.swagger.jaxrs.listing.ApiListingResource, is not recognized as valid resource method.
  SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.wordnik.swagger.jaxrs.listing.ApiListingResource.resourceListing(javax.ws.rs.core.Application,javax.servlet.ServletConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 1
  SEVERE: Method, public javax.ws.rs.core.Response com.wordnik.swagger.jaxrs.listing.ApiListingResource.resourceListing(javax.ws.rs.core.Application,javax.servlet.ServletConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of resource, class com.wordnik.swagger.jaxrs.listing.ApiListingResource, is not recognized as valid resource method.


I have the required necessary dependency in my pom file and I do see the swagger libraries gets added in my project lib folder but still getting this error.

Thanks.
Buland

tony tam

unread,
Mar 22, 2014, 2:21:11 PM3/22/14
to swagger-sw...@googlegroups.com
Make sure you have the Jersey dependencies in your pom. Sounds like Jersey-core is missing

Buland Malik

unread,
Mar 22, 2014, 2:48:47 PM3/22/14
to swagger-sw...@googlegroups.com
Hi Tom,

That dependency is there as we have REST services running with Mule & Jersey. But I do not have an easy way to add the MessageBodyWriters (ApiDeclarationProvider & ResourceListingProvider) so do you think this problem is because of that?

Thanks.
Buland

Buland Malik

unread,
Mar 22, 2014, 3:01:21 PM3/22/14
to swagger-sw...@googlegroups.com
I apologies as I did not mean 'Tom' but 'Tony'.

tony tam

unread,
Mar 22, 2014, 3:18:28 PM3/22/14
to swagger-sw...@googlegroups.com
The missing provider would not cause an error. What jersey version do you have?

tony tam

unread,
Mar 22, 2014, 3:18:28 PM3/22/14
to swagger-sw...@googlegroups.com

Buland Malik

unread,
Mar 23, 2014, 1:47:35 AM3/23/14
to swagger-sw...@googlegroups.com
Jersey 1.6

Ron

unread,
Mar 23, 2014, 4:25:40 AM3/23/14
to swagger-sw...@googlegroups.com
Can you share your pom.xml?
Even better, can you possibly create a test application and share it?


--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Buland Malik

unread,
Mar 23, 2014, 11:12:45 AM3/23/14
to swagger-sw...@googlegroups.com
These are all he dependencies I have ....

        <dependencies>
            <!-- Mule Modules -->
            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-core</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.muleesb.modules</groupId>
                <artifactId>mule-module-boot-ee</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-spring-config</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.muleesb</groupId>
                <artifactId>mule-core-ee</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-client</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-cxf</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-management</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-scripting</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-sxc</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-xml</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.muleesb.transports</groupId>
                <artifactId>mule-transport-jdbc-ee</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- REST API -->
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-jersey</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
           
            <!-- for testing -->
            <dependency>
                <groupId>org.mule.tests</groupId>
                <artifactId>mule-tests-functional</artifactId>
                <version>${mule.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>mockobjects</groupId>
                <artifactId>mockobjects-core</artifactId>
                <version>0.09</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
        <dependencies>
            <dependency>
              <groupId>com.googlecode.json-simple</groupId>
              <artifactId>json-simple</artifactId>
              <version>1.1.1</version>
            </dependency>
           
            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-core</artifactId>
            </dependency>   
            <dependency>
                <groupId>org.mule.modules</groupId>
                <artifactId>mule-module-jersey</artifactId>
            </dependency>
            <dependency>
              <groupId>com.wordnik</groupId>
              <artifactId>swagger-jaxrs_2.10</artifactId>
              <version>1.3.0</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.8</version>
                <scope>test</scope>
            </dependency>
        </dependencies>

On Sunday, March 23, 2014 1:25:40 AM UTC-7, Ron R wrote:
Can you share your pom.xml?
Even better, can you possibly create a test application and share it?
On Sun, Mar 23, 2014 at 7:47 AM, Buland Malik <bulan...@gmail.com> wrote:
Jersey 1.6


On Saturday, March 22, 2014 12:18:28 PM UTC-7, tony tam wrote:
The missing provider would not cause an error. What jersey version do you have?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron

unread,
Mar 23, 2014, 12:41:48 PM3/23/14
to swagger-sw...@googlegroups.com
You're using a very old version of Swagger. Try upgrading to 1.3.2 or 1.3.3-SNAPSHOT and test again.


To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Buland Malik

unread,
Mar 23, 2014, 9:50:12 PM3/23/14
to swagger-sw...@googlegroups.com
Thanks Ron. I will try it out with that version but we got this https://github.com/wordnik/swagger-core/wiki/Java-CXF-Quickstart.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscri...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Buland Malik

unread,
Mar 24, 2014, 12:46:08 AM3/24/14
to swagger-sw...@googlegroups.com
I changed it to 1.3.2 but still getting the same error.

Ron

unread,
Mar 24, 2014, 8:46:27 AM3/24/14
to swagger-sw...@googlegroups.com
The best thing I can offer at the moment is that you share a sample project where the result can be reproduced with which I could play around and solve the issue.

Can you do that?


To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

tony tam

unread,
Mar 24, 2014, 10:50:06 AM3/24/14
to swagger-sw...@googlegroups.com
Also need to see the versions from your <properties> section so the mule version, etc. can be known

Buland Malik

unread,
Mar 24, 2014, 11:26:22 AM3/24/14
to swagger-sw...@googlegroups.com
sure let me build one smaple project and get back to you. It will take me a day or two so let me get back to you.

Can you meantime tell me where in the source I can see this error or its generic error of Jersey?

Ron

unread,
Mar 24, 2014, 11:27:50 AM3/24/14
to swagger-sw...@googlegroups.com
The error you're seeing is coming from Jersey.


To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Buland Malik

unread,
Mar 25, 2014, 7:32:05 PM3/25/14
to swagger-sw...@googlegroups.com
I have a sample app but I cannot attach it because its of 28MB. Is there any FTP where I can send it?

Ron

unread,
Mar 26, 2014, 12:04:03 AM3/26/14
to swagger-sw...@googlegroups.com

Since you use Gmail, how about your Google Drive account?

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Łukasz Radziwonowicz

unread,
Apr 14, 2014, 6:57:33 AM4/14/14
to swagger-sw...@googlegroups.com
Hi, did you resolve the problem? I'm getting the same error and I can't fix it.

Cheers, Lukasz

tony tam

unread,
Apr 14, 2014, 10:12:48 AM4/14/14
to swagger-sw...@googlegroups.com
Hi Lukasz, yes we do have swagger working fine inside mule.  What version of mule are you using?
Reply all
Reply to author
Forward
0 new messages