newbie. problems in Swagger Set up

856 views
Skip to first unread message

Jack

unread,
Feb 3, 2016, 6:00:42 PM2/3/16
to Swagger
Hi,

I am a newbie in Swagger. 


My project uses Spring so the hook up and configure& initialize I followed the spring section of the page.

I put    

 <bean id="apiListingResource" class="io.swagger.jaxrs.listing.ApiListingResource"/>
    <bean id="swaggerSerializers" class="io.swagger.jaxrs.listing.SwaggerSerializers" scope="singleton"/>
    <bean id="beanConfig" class="io.swagger.jaxrs.config.BeanConfig">
        <property name="title" value="Swagger Sample App"/>
        <property name="version" value="1.0" />
        <property name="schemes" value="http" />
        <property name="host" value="companyName.biz" />
        <property name="basePath" value="/api/1.0"/>
        <property name="scan" value="true"/>
        <property name="resourcePackage" value="biz.neustar.webmetrics.rest"/>
    </bean>
into spring-persistence.xml  . And the build is okay and I start the server and try to get the swagger.json at http://companyName.biz/api/1.0/swagger.json I got errors. 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 org.reflections.util.ClasspathHelper.forPackage(Ljava/lang/String;[Ljava/lang/ClassLoader;)Ljava/util/Collection;</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /api/1.0/swagger.json. Reason:
<pre>    org.reflections.util.ClasspathHelper.forPackage(Ljava/lang/String;[Ljava/lang/ClassLoader;)Ljava/util/Collection;</pre></p><h3>Caused by:</h3><pre>java.lang.NoSuchMethodError: org.reflections.util.ClasspathHelper.forPackage(Ljava/lang/String;[Ljava/lang/ClassLoader;)Ljava/util/Collection;
at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:189)
at io.swagger.jaxrs.listing.ApiListingResource.scan(ApiListingResource.java:58)
at io.swagger.jaxrs.listing.ApiListingResource.getListingJson(ApiListingResource.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1352)
at biz.neustar.webmetrics.rest.filter.ResponseCacheFilter.doFilter(ResponseCacheFilter.java:29)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:476)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:241)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:745)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>                                                
<br/>                                                

....



Can anyone shed light on this ?

Thanks,
Jack

Ron Ratovsky

unread,
Feb 3, 2016, 6:50:47 PM2/3/16
to swagger-sw...@googlegroups.com
Can you provide more details about your runtime environment including versions?

--
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.

Jack

unread,
Feb 3, 2016, 7:18:34 PM2/3/16
to Swagger

java version "1.8.0_31"

Java(TM) SE Runtime Environment (build 1.8.0_31-b13)

Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)


./pom.xml: <jersey.version>1.9-ea04</jersey.version>


IDE is netbeans 8.0+ well it is not runtime env but.


And what else do you need?

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

Ron Ratovsky

unread,
Feb 3, 2016, 7:20:44 PM2/3/16
to swagger-sw...@googlegroups.com
Which application server is used to deploy the app?
Which version of swagger-core?
Any reason why you’re using such an old version of Jersey (and a non-GA one as well)?

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

Jack

unread,
Feb 3, 2016, 7:25:34 PM2/3/16
to Swagger
I think the error msg shows jetty is the server.
                <dependency>
                    <groupId>io.swagger</groupId>
                    <artifactId>swagger-jersey-jaxrs</artifactId>
                    <version>1.5.0</version>
                </dependency>
Is this Swagger core?

I have no idea why we use such an old version. Does non-GA means Swagger can not generate definition for it ?

Ron Ratovsky

unread,
Feb 3, 2016, 7:27:41 PM2/3/16
to swagger-sw...@googlegroups.com
No, the version of Jersey will not be an issue. Was just curious about it.

Bump the version of swagger-jersey-jaxrs up to 1.5.6 and you should be good to go. I hope.

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

Jack

unread,
Feb 3, 2016, 7:36:46 PM2/3/16
to Swagger
Well not yet. The same error.

Btw, should I put the 

<bean id="apiListingResource" class="io.swagger.jaxrs.listing.ApiListingResource"/>
    <bean id="swaggerSerializers" class="io.swagger.jaxrs.listing.SwaggerSerializers" scope="singleton"/>
and the 
 <bean id="beanConfig" class="io.swagger.jaxrs.config.BeanConfig">
        <property name="title" value="Swagger Sample App"
/>
        <property name="version" value="1.0.0" />
        <property name="schemes" value="http" />
        <property name="host" value="localhost:8002" />
        <property name="basePath" value="/api"/>
        <property name="resourcePackage" value="io.swagger.resources"/>
        <property name="scan" value="true"/>
    </bean>

Into the same xml? spring-persistence.xml or spring-service.xml or what else? The link says application context configuration file. I am not sure of it .

Ron Ratovsky

unread,
Feb 3, 2016, 7:43:07 PM2/3/16
to swagger-sw...@googlegroups.com
It’s not a coding issue, it’s a dependency issue.

Can you run ‘mvn dependency:list` and paste the content here please?

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

Jack

unread,
Feb 3, 2016, 7:51:55 PM2/3/16
to Swagger
See below. Thank you.


[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] SERVICENAME Home
[INFO] home-model
[INFO] Home API
[INFO] Home UI
[INFO] Home integration
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building SERVICENAME Home 1.7.455-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ home ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    none
[INFO] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building home-model 1.7.455-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ home-model ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.hibernate:hibernate-annotations:jar:3.5.5-Final:compile
[INFO]    joda-time:joda-time:jar:2.1:compile
[INFO]    org.aspectj:aspectjweaver:jar:1.6.9:compile
[INFO]    org.hibernate:hibernate-validator:jar:4.2.0.Final:compile
[INFO]    aopalliance:aopalliance:jar:1.0:compile
[INFO]    log4j:log4j:jar:1.2.15:compile
[INFO]    org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO]    javax.activation:activation:jar:1.1:compile
[INFO]    xml-apis:xml-apis:jar:1.0.b2:compile
[INFO]    javax.mail:mail:jar:1.4:compile
[INFO]    org.codehaus.jackson:jackson-mapper-asl:jar:1.8.5:compile
[INFO]    org.slf4j:slf4j-api:jar:1.6.2:compile
[INFO]    com.sun.jersey:jersey-core:jar:1.9-ea04:compile
[INFO]    org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO]    org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO]    org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO]    org.aspectj:aspectjrt:jar:1.6.9:compile
[INFO]    com.google.guava:guava:jar:r08:compile
[INFO]    org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO]    antlr:antlr:jar:2.7.6:compile
[INFO]    commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    commons-collections:commons-collections:jar:3.1:compile
[INFO]    javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO]    org.hibernate:hibernate-core:jar:3.5.5-Final:compile
[INFO]    javax.transaction:jta:jar:1.1:compile
[INFO]    org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO]    org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO]    org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO]    org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO]    dom4j:dom4j:jar:1.6.1:compile
[INFO]    org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Home API 1.7.455-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ home-api ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    redis.clients:jedis:jar:2.6.0:compile
[INFO]    eclipse:jdtcore:jar:3.1.0:compile
[INFO]    aopalliance:aopalliance:jar:1.0:compile
[INFO]    com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.5:compile
[INFO]    com.sun.jersey:jersey-servlet:jar:1.13:compile
[INFO]    org.mongodb:mongo-java-driver:jar:2.13.2:compile
[INFO]    net.tanesha.recaptcha4j:recaptcha4j:jar:0.0.7:compile
[INFO]    org.eclipse.jetty:jetty-webapp:jar:7.4.5.v20110725:compile
[INFO]    commons-digester:commons-digester:jar:1.7:compile
[INFO]    com.eaio.uuid:uuid:jar:3.2:compile
[INFO]    com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.4.5:compile
[INFO]    org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO]    org.eclipse.jetty:jetty-util:jar:7.4.5.v20110725:compile
[INFO]    javax.annotation:jsr250-api:jar:1.0:compile
[INFO]    jasperreports:jasperreports:jar:3.5.1:compile
[INFO]    commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    com.sun.jersey.contribs:jersey-spring:jar:1.6:compile
[INFO]    commons-io:commons-io:jar:2.4:compile
[INFO]    cglib:cglib:jar:2.2:compile
[INFO]    com.lowagie:itext:jar:2.1.0:compile
[INFO]    junit:junit:jar:4.8.2:test
[INFO]    com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.4.5:compile
[INFO]    bouncycastle:bcmail-jdk14:jar:136:compile
[INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    org.eclipse.jetty:jetty-http:jar:7.4.5.v20110725:compile
[INFO]    dom4j:dom4j:jar:1.6.1:compile
[INFO]    com.rabbitmq:amqp-client:jar:2.8.1:compile
[INFO]    com.sun.jersey:jersey-client:jar:1.9-ea04:compile
[INFO]    org.eclipse.jetty:jetty-io:jar:7.4.5.v20110725:compile
[INFO]    joda-time:joda-time:jar:2.1:compile
[INFO]    io.swagger:swagger-annotations:jar:1.5.6:compile
[INFO]    org.eclipse.jetty:jetty-xml:jar:7.4.5.v20110725:compile
[INFO]    com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO]    com.amazonaws:aws-java-sdk:jar:1.1.9:compile
[INFO]    org.eclipse.jetty:jetty-security:jar:7.4.5.v20110725:compile
[INFO]    log4j:log4j:jar:1.2.15:compile
[INFO]    commons-codec:commons-codec:jar:1.3:compile
[INFO]    com.quova.platform:platform-api-dto:jar:1.6.6:compile
[INFO]    org.eclipse.jetty:jetty-server:jar:7.4.5.v20110725:compile
[INFO]    javax.xml.ws:jaxws-api:jar:2.1:compile
[INFO]    org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO]    org.hibernate:hibernate-parent:pom:3.5.5-Final:compile
[INFO]    org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO]    javax.activation:activation:jar:1.1:compile
[INFO]    org.jvnet.staxex:stax-ex:jar:1.2:compile
[INFO]    ca.juliusdavies:not-yet-commons-ssl:jar:0.3.11:compile
[INFO]    org.springframework:spring-test:jar:3.0.5.RELEASE:compile
[INFO]    org.yaml:snakeyaml:jar:1.12:compile
[INFO]    asm:asm:jar:3.1:compile
[INFO]    org.springframework:spring-orm:jar:3.0.5.RELEASE:compile
[INFO]    javax.xml.stream:stax-api:jar:1.0:compile
[INFO]    org.apache.tomcat:tomcat-jdbc:jar:7.0.22:compile
[INFO]    biz.companyName.webmetrics:home-model:jar:1.7.455-SNAPSHOT:compile
[INFO]    org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO]    com.atlassian.crowd:embedded-crowd-api:jar:2.7.0:compilecompanyName
[INFO]    org.jvnet:mimepull:jar:1.2:compile
[INFO]    com.atlassian.ip:atlassian-ip:jar:3.1:compile
[INFO]    javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO]    biz.companyName.billing:billing-api:jar:0.0.13:compile
[INFO]    org.jamon:jamon:jar:2.7:compile
[INFO]    jfree:jfreechart:jar:1.0.12:compile
[INFO]    org.apache.commons:commons-pool2:jar:2.0:compile
[INFO]    javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO]    net.sf.ehcache:ehcache-core:jar:2.4.3:compile
[INFO]    javax.transaction:jta:jar:1.1:compile
[INFO]    javassist:javassist:jar:3.9.0.GA:compile
[INFO]    org.springframework:spring-aspects:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO]    javax.servlet:servlet-api:jar:2.5:compile
[INFO]    org.springframework.security:spring-security-config:jar:3.0.5.RELEASE:compile
[INFO]    com.google.guava:guava-gwt:jar:14.0.1:compile
[INFO]    javax.xml.soap:saaj-api:jar:1.3:compile
[INFO]    oro:oro:jar:2.0.8:compile
[INFO]    stax:stax-api:jar:1.0.1:compile
[INFO]    com.eaiti:rest-base:jar:1.0.3:compile
[INFO]    mysql:mysql-connector-java:jar:5.1.32:compile
[INFO]    com.fasterxml.jackson.core:jackson-core:jar:2.4.5:compile
[INFO]    com.sun.xml.stream:sjsxp:jar:1.0.1:compile
[INFO]    org.eclipse.jetty:jetty-continuation:jar:7.4.5.v20110725:compile
[INFO]    org.springframework.security:spring-security-web:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework.data:spring-data-redis:jar:1.4.1.RELEASE:compile
[INFO]    org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO]    xml-apis:xml-apis:jar:1.3.02:compile
[INFO]    dnsjava:dnsjava:jar:2.1.0:compile
[INFO]    org.slf4j:slf4j-log4j12:jar:1.6.2:compile
[INFO]    commons-lang:commons-lang:jar:2.4:compile
[INFO]    javax.mail:mail:jar:1.4:compile
[INFO]    com.sun.xml.ws:jaxws-rt:jar:2.1.4:compile
[INFO]    com.sun.jersey:jersey-core:jar:1.9-ea04:compile
[INFO]    org.eclipse.jetty:jetty-servlet:jar:7.4.5.v20110725:compile
[INFO]    com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.1:compile
[INFO]    com.google.guava:guava:jar:r08:compile
[INFO]    com.atlassian.crowd:crowd-integration-client-rest:jar:2.7.0:compile
[INFO]    org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO]    biz.companyName.webmetrics:java-core:jar:1.6.131:compile
[INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.7:compile
[INFO]    org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO]    ar.com.fdvs:DynamicJasper:jar:3.0.13:compile
[INFO]    org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO]    com.google.code.gson:gson:jar:2.2.4:compile
[INFO]    com.sun.jersey.contribs:jersey-multipart:jar:1.6:compile
[INFO]    bouncycastle:bcprov-jdk14:jar:136:compile
[INFO]    com.atlassian.crowd:crowd-integration-api:jar:2.7.0:compile
[INFO]    org.apache.commons:commons-lang3:jar:3.1:compile
[INFO]    biz.companyName:oce-api:jar:0.2.2-1425311502:compile
[INFO]    io.swagger:swagger-core:jar:1.5.6:compile
[INFO]    org.hibernate:hibernate-annotations:jar:3.5.5-Final:compile
[INFO]    com.googlecode.ehcache-spring-annotations:ehcache-spring-annotations:jar:1.1.3:compile
[INFO]    io.swagger:swagger-jersey-jaxrs:jar:1.5.6:compile
[INFO]    com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO]    org.aspectj:aspectjweaver:jar:1.6.9:compile
[INFO]    org.hibernate:hibernate-validator:jar:4.2.0.Final:compile
[INFO]    org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[INFO]    com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.4.5:compile
[INFO]    com.atlassian.crowd:crowd-integration-client-common:jar:2.7.0:compile
[INFO]    commons-collections:commons-collections:jar:3.2.1:compile
[INFO]    org.apache.velocity:velocity:jar:1.6.4:compile
[INFO]    org.apache.tomcat:tomcat-juli:jar:7.0.22:compile
[INFO]    commons-pool:commons-pool:jar:1.6:compile
[INFO]    commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO]    org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile
[INFO]    com.sun.jersey:jersey-server:jar:1.9-ea04:compile
[INFO]    org.slf4j:slf4j-api:jar:1.6.2:compile
[INFO]    jfree:jcommon:jar:1.0.15:compile
[INFO]    org.reflections:reflections:jar:0.9.8:compile
[INFO]    io.swagger:swagger-jaxrs:jar:1.5.6:compile
[INFO]    org.aspectj:aspectjrt:jar:1.6.9:compile
[INFO]    org.flywaydb:flyway-core:jar:3.0:compile
[INFO]    com.sun.jersey:jersey-json:jar:1.9-ea04:compile
[INFO]    org.hibernate:hibernate-entitymanager:jar:3.5.5-Final:compile
[INFO]    antlr:antlr:jar:2.7.6:compile
[INFO]    org.hibernate:hibernate-core:jar:3.5.5-Final:compile
[INFO]    biz.companyName:loggly:jar:1.0-beta-5:compile
[INFO]    org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO]    org.codehaus.jettison:jettison:jar:1.1:compile
[INFO]    org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO]    com.fasterxml.jackson.core:jackson-annotations:jar:2.4.5:compile
[INFO]    org.mozilla:rhino:jar:1.7.6:compile
[INFO]    io.swagger:swagger-models:jar:1.5.6:compile
[INFO]    org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.4.5:compile
[INFO]    com.sun.xml.stream.buffer:streambuffer:jar:0.7:compile
[INFO]    org.apache.httpcomponents:httpclient:jar:4.0.3:compile
[INFO]    org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO]    com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.4.5:compile
[INFO]    com.atlassian.security:atlassian-cookie-tools:jar:3.2:compile
[INFO]    org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile
[INFO]    org.slf4j:slf4j-jdk14:jar:1.5.6:compile
[INFO]    com.fasterxml.jackson.core:jackson-databind:jar:2.4.5:compile
[INFO]    commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Home UI 1.7.455-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ home-ui ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    none
[INFO] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Home integration 1.7.455-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ home-integration ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.mule.transports:mule-transport-ssl:jar:3.2.0:compile
[INFO]    com.experlog:xapool:jar:1.5.0-osgi:compile
[INFO]    org.apache.santuario:xmlsec:jar:1.4.4:compile
[INFO]    org.mule.modules:mule-module-builders:jar:3.2.0:compile
[INFO]    com.sun.xml.messaging.saaj:saaj-impl:jar:1.3-osgi:compile
[INFO]    asm:asm-commons:jar:3.1:compile
[INFO]    aopalliance:aopalliance:jar:1.0:compile
[INFO]    asm:asm-analysis:jar:2.2.3:compile
[INFO]    org.mule.modules:mule-module-annotations:jar:3.2.0:compile
[INFO]    org.mule.transports:mule-transport-jdbc:jar:3.2.0:compile
[INFO]    org.codehaus.groovy:groovy-all:jar:1.6.7:compile
[INFO]    com.thoughtworks.xstream:xstream:jar:1.2.2-osgi:compile
[INFO]    org.apache.cxf:cxf-rt-transports-local:jar:2.3.1:compile
[INFO]    org.mule.transports:mule-transport-stdio:jar:3.2.0:compile
[INFO]    org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO]    xerces:xercesImpl:jar:2.8.1:compile
[INFO]    javax.annotation:jsr250-api:jar:1.0:compile
[INFO]    org.codehaus.groovy:groovy:jar:1.6.7:compile
[INFO]    org.apache.ant:ant-launcher:jar:1.7.1:compile
[INFO]    org.mule.modules:mule-module-xml:jar:3.2.0:compile
[INFO]    commons-logging:commons-logging:jar:1.2:compile
[INFO]    mx4j:mx4j-impl:jar:2.1.1-osgi:compile
[INFO]    jaxen:jaxen:jar:1.1.1:compile
[INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    asm:asm-util:jar:2.2.3:compile
[INFO]    com.rabbitmq:amqp-client:jar:2.8.1:compile
[INFO]    org.codehaus.woodstox:woodstox-core-asl:jar:4.0.8:compile
[INFO]    tomcat:tomcat-util:jar:5.5.23:compile
[INFO]    tanukisoft:wrapper:jar:3.2.3:compile
[INFO]    org.mule:mule-core:jar:3.2.0:compile
[INFO]    com.amazonaws:aws-java-sdk:jar:1.1.9:compile
[INFO]    jline:jline:jar:0.9.94:compile
[INFO]    org.apache.cxf:cxf-rt-bindings-xml:jar:2.3.1:compile
[INFO]    ant:ant:jar:1.6.5:runtime
[INFO]    tomcat:tomcat-apr:jar:5.5.23:compile
[INFO]    log4j:log4j:jar:1.2.15:compile
[INFO]    org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.1.1:compile
[INFO]    mysql:mysql-connector-java:jar:5.1.5:compile
[INFO]    org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO]    org.mule.transports:mule-transport-sftp:jar:3.2.0:compile
[INFO]    org.apache.cxf:cxf-common-schemas:jar:2.3.1:compile
[INFO]    ca.juliusdavies:not-yet-commons-ssl:jar:0.3.11:compile
[INFO]    xml-apis:xml-apis:jar:1.3.03:compile
[INFO]    org.mule.modules:mule-module-cxf:jar:3.2.0:compile
[INFO]    org.springmodules:spring-modules-cache:jar:0.9:compile
[INFO]    asm:asm:jar:3.1:compile
[INFO]    org.apache.tomcat:tomcat-jdbc:jar:7.0.22:compile
[INFO]    com.yourkit:yjp-controller-api-redist:jar:9.0.8:compile
[INFO]    org.codehaus.jackson:jackson-mapper-asl:jar:1.8.0:compile
[INFO]    net.sourceforge.nekohtml:nekohtml:jar:1.9.9:compile
[INFO]    com.sun.xml.bind:jaxb-xjc:jar:2.1.13:compile
[INFO]    org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO]    mx4j:mx4j-jmx:jar:2.1.1-osgi:compile
[INFO]    org.springframework.security:spring-security-core:jar:3.0.5.RELEASE:compile
[INFO]    wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO]    net.java.dev.stax-utils:stax-utils:jar:20080702-osgi:compile
[INFO]    org.mule.transports:mule-transport-vm:jar:3.2.0:compile
[INFO]    org.apache.cxf:cxf-rt-ws-security:jar:2.3.1:compile
[INFO]    org.springframework.security:spring-security-config:jar:3.0.5.RELEASE:compile
[INFO]    net.sf.saxon:saxon:jar:8.9.0.4-osgi:compile
[INFO]    javax.xml.soap:saaj-api:jar:1.3:compile
[INFO]    commons-jxpath:commons-jxpath:jar:1.3-osgi:compile
[INFO]    stax:stax-api:jar:1.0.1:compile
[INFO]    org.mule.modules:mule-module-client:jar:3.2.0:compile
[INFO]    org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.3.1:compile
[INFO]    org.springframework.security:spring-security-web:jar:3.0.5.RELEASE:compile
[INFO]    org.apache.cxf:cxf-tools-common:jar:2.3.1:compile
[INFO]    org.mule.modules:mule-module-spring-security:jar:3.2.0:compile
[INFO]    org.slf4j:slf4j-log4j12:jar:1.6.2:compile
[INFO]    commons-lang:commons-lang:jar:2.4:compile
[INFO]    isorelax:isorelax:jar:20030108:compile
[INFO]    commons-codec:commons-codec:jar:1.3-osgi:compile
[INFO]    org.apache.cxf:cxf-api:jar:2.3.1:compile
[INFO]    org.apache.cxf:cxf-rt-transports-http:jar:2.3.1:compile
[INFO]    joda-time:joda-time:jar:1.6:compile
[INFO]    org.mule.transports:mule-transport-tcp:jar:3.2.0:compile
[INFO]    javax.mail:mail:jar:1.4:compile
[INFO]    org.apache.cxf:cxf-rt-core:jar:2.3.1:compile
[INFO]    antlr:antlr:jar:2.7.7:compile
[INFO]    commons-dbutils:commons-dbutils:jar:1.2:compile
[INFO]    org.apache.cxf:cxf-rt-bindings-soap:jar:2.3.1:compile
[INFO]    org.springframework:spring-jms:jar:3.0.3.RELEASE:compile
[INFO]    org.mule.transports:mule-transport-quartz:jar:3.2.0:compile
[INFO]    cglib:cglib-nodep:jar:2.2:compile
[INFO]    org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO]    mx4j:mx4j-remote:jar:2.1.1-osgi:compile
[INFO]    org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1-osgi:compile
[INFO]    org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO]    javax.activation:activation:jar:1.1-osgi:compile
[INFO]    org.apache.cxf:cxf-rt-ws-rm:jar:2.3.1:compile
[INFO]    org.apache.ant:ant:jar:1.7.1:compile
[INFO]    net.sf.saxon:saxon-dom:jar:8.9.0.4-osgi:compile
[INFO]    org.apache.cxf:cxf-rt-ws-addr:jar:2.3.1:compile
[INFO]    org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile
[INFO]    org.codehaus.woodstox:stax2-api:jar:3.0.2:compile
[INFO]    org.mule.modules:mule-module-management:jar:3.2.0:compile
[INFO]    org.safehaus.jug:jug:jar:asl:2.0.0:compile
[INFO]    net.sf.saxon:saxon-xqj:jar:8.9.0.4:compile
[INFO]    dom4j:dom4j:jar:1.6.1-osgi:compile
[INFO]    org.apache.cxf:cxf-rt-frontend-simple:jar:2.3.1:compile
[INFO]    jdom:jdom:jar:1.0:compile
[INFO]    org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.3.1:compile
[INFO]    com.jcraft:jsch:jar:0.1.45:compile
[INFO]    org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO]    commons-httpclient:commons-httpclient:jar:3.1-osgi:compile
[INFO]    commons-io:commons-io:jar:1.4:compile
[INFO]    org.aspectj:aspectjweaver:jar:1.6.9:compile
[INFO]    asm:asm-tree:jar:2.2.3:compile
[INFO]    org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[INFO]    commons-collections:commons-collections:jar:3.2.1:compile
[INFO]    net.sf.json-lib:json-lib:jar:jdk15:2.3:compile
[INFO]    quartz:quartz-all:jar:1.6.6:compile
[INFO]    org.apache.cxf:cxf-wstx-msv-validation:jar:2.3.1:compile
[INFO]    org.apache.tomcat:tomcat-juli:jar:7.0.22:compile
[INFO]    com.sun.msv.datatype.xsd:xsdlib:jar:2010.1:compile
[INFO]    org.mule.modules:mule-module-scripting:jar:3.2.0:compile
[INFO]    commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO]    junit:junit:jar:4.8.1:compile
[INFO]    org.slf4j:slf4j-api:jar:1.6.2:compile
[INFO]    org.mule.modules:mule-module-spring-extras:jar:3.2.0:compile
[INFO]    org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1-osgi:compile
[INFO]    commons-cli:commons-cli:jar:1.2:compile
[INFO]    org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO]    org.apache.cxf:cxf-rt-databinding-aegis:jar:2.3.1:compile
[INFO]    org.apache.neethi:neethi:jar:2.0.4:compile
[INFO]    org.apache.cxf:cxf-common-utilities:jar:2.3.1:compile
[INFO]    javax.jws:jsr181-api:jar:1.0-MR1:compile
[INFO]    org.apache.ws.security:wss4j:jar:1.5.10:compile
[INFO]    org.aspectj:aspectjrt:jar:1.6.9:compile
[INFO]    org.samba.jcifs:jcifs:jar:1.3.3:compile
[INFO]    org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO]    org.livetribe:livetribe-jsr223:jar:2.0.5:compile
[INFO]    org.mule.transports:mule-transport-file:jar:3.2.0:compile
[INFO]    mx4j:mx4j-tools:jar:2.1.1-osgi:compile
[INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.5:compile
[INFO]    org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO]    relaxngDatatype:relaxngDatatype:jar:20020414:compile
[INFO]    org.mule.transports:mule-transport-http:jar:3.2.0:compile
[INFO]    org.mule.modules:mule-module-json:jar:3.2.0:compile
[INFO]    org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[INFO]    org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.1:compile
[INFO]    commons-pool:commons-pool:jar:1.5.3:compile
[INFO]    net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO]    org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    net.java.dev.msv:msv-core:jar:2010.1:compile
[INFO]    org.apache.httpcomponents:httpclient:jar:4.0.3:compile
[INFO]    javax.xml.ws:jaxws-api:jar:2.2.1:compile
[INFO]    org.mule.modules:mule-module-spring-config:jar:3.2.0:compile
[INFO]    xml-resolver:xml-resolver:jar:1.2:compile
[INFO]    org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO]    org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile
[INFO]    xpp3:xpp3_min:jar:1.1.3.4.O-osgi:compile
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] SERVICENAME Home ........................................... SUCCESS [  0.600 s]
[INFO] home-model ......................................... SUCCESS [  0.085 s]
[INFO] Home API ........................................... SUCCESS [  0.419 s]
[INFO] Home UI ............................................ SUCCESS [  0.002 s]
[INFO] Home integration ................................... SUCCESS [  0.292 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.673 s
[INFO] Finished at: 2016-02-03T16:49:40-08:00
[INFO] Final Memory: 22M/437M
[INFO] ------------------------------------------------------------------------

Ron Ratovsky

unread,
Feb 3, 2016, 7:55:50 PM2/3/16
to swagger-sw...@googlegroups.com
[INFO]    org.reflections:reflections:jar:0.9.8:compile
 
That’s the issue. You have another dependency that pulls in an old version reflections which breaks swagger-core.
To find out which dependency pulls that in, you can run `mvn dependency:tree` and see in the tree what brings it.
You can also paste the output of it here, but it would be extremely long based on the number of dependencies you have. Possibly attach it as a file instead.

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

Jack

unread,
Feb 3, 2016, 8:04:48 PM2/3/16
to Swagger
...
tree.txt

Jack

unread,
Feb 3, 2016, 8:05:13 PM2/3/16
to Swagger
Thanks. I attached the file in another reply. 


On Wednesday, February 3, 2016 at 4:55:50 PM UTC-8, Ron wrote:
...

Ron Ratovsky

unread,
Feb 3, 2016, 8:07:12 PM2/3/16
to swagger-sw...@googlegroups.com
biz.COMPANYNAME.webmetrics:java-core <— that pulls the older version of reflections. I assume that’s your internal app. You’d have to explicitly exclude reflections from it in order to get swagger-core to work. I can’t tell you how it’d affect your internal app, if at all.


--

Jack

unread,
Feb 3, 2016, 8:51:02 PM2/3/16
to Swagger
Thank you. I will try to exclude it and try.
...

Jack

unread,
Feb 4, 2016, 1:52:47 PM2/4/16
to Swagger
I PUT                    
                    <exclusions>
                            <exclusion>
                                <groupId>org.reflections</groupId>
                                <artifactId>reflections</artifactId> 
                            </exclusion>
                    </exclusions>

into that dependency tag and it works. 
I put 
    <bean id="swaggerSerializers" class="io.swagger.jaxrs.listing.SwaggerSerializers" scope="singleton"/>
    <bean id="beanConfig" class="io.swagger.jaxrs.config.BeanConfig">
        <property name="title" value="Swagger Sample App"/>
        <property name="version" value="1.0" />
        <property name="schemes" value="http" />
        <property name="host" value="home.stagingwpm.COMPANYNAME.biz" />
        <property name="basePath" value="/api/1.0"/>
        <property name="scan" value="true"/>
        <property name="resourcePackage" value="biz.COMPANYNAME.webmetrics.rest"/>
    </bean>

into my spring-service.xml
and now once the server starts, it gives 

{"swagger":"2.0","info":{"version":"1.0","title":"Swagger Sample App"},"host":"home.stagingwpm.COMPANYNAME.biz","basePath":"/api/1.0","schemes":["http"]}


seems it gives what I put into the bean tag and did not scan anything from the resource path. 

Thanks for your help!!



On Wednesday, February 3, 2016 at 5:07:12 PM UTC-8, Ron wrote:
...
Reply all
Reply to author
Forward
0 new messages