Closed ljramones closed 9 years ago
@larry13767 This usually means that the servlet 2.5 api is on your classpath and it shouldn't be. Can you verify?
Yes, I realized that but I pretty much just checked it out and build/ran it as is.
I just did a dependency graph (thanks Intellij) and I see that servlet 2.5 comes in this way
spring-cloud-starter-eureka: 1.0.0.BUILD-20141030.072219-17
eureka-client: 1.1.135
jetty: 6.1H.22
servlet-api: 2.5-2081211
So I did an exclude on the jetty dependency with
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>org.mortbay.jetty</groupId>
</exclusion>
</exclusions>
</dependency>
and added the javax.servlet 3.1 dependency and everything works
No one else has this? Because I never made any changes to what I checked out.
@larry13767 how are you running configserver?
When I run mvn dependency:tree
I get the following, which does not include the servlet api
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Config Server 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ configserver ---
[INFO] org.demo:configserver:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.cloud:spring-cloud-config-server:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-config-client:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-actuator:jar:1.1.8.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-crypto:jar:3.2.5.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-rsa:jar:1.0.0.M2:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.47:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.47:compile
[INFO] | +- org.eclipse.jgit:org.eclipse.jgit:jar:2.3.1.201302201838-r:compile
[INFO] | | \- com.jcraft:jsch:jar:0.1.46:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.13:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-eureka:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-netflix-core:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | | \- com.google.guava:guava:jar:18.0:compile
[INFO] | \- com.netflix.eureka:eureka-client:jar:1.1.135:compile
[INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | +- com.netflix.servo:servo-core:jar:0.7.4:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:2.0.0:compile
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.2:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- com.sun.jersey:jersey-core:jar:1.13:compile
[INFO] | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.1.2:compile
[INFO] | | +- org.apache.commons:commons-math:jar:2.2:compile
[INFO] | | \- com.netflix.netflix-commons:netflix-infix:jar:0.1.2:compile
[INFO] | | +- joda-time:joda-time:jar:2.3:compile
[INFO] | | +- commons-jxpath:commons-jxpath:jar:1.3:compile
[INFO] | | +- org.antlr:antlr-runtime:jar:3.4:compile
[INFO] | | | +- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] | | | \- antlr:antlr:jar:2.7.7:compile
[INFO] | | \- com.google.code.gson:gson:jar:2.1:compile
[INFO] | +- com.netflix.archaius:archaius-core:jar:0.6.0:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.11:compile
[INFO] | | +- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO] | +- com.netflix.ribbon:ribbon-httpclient:jar:2.0-RC9:compile
[INFO] | | +- com.netflix.netflix-commons:netflix-commons-util:jar:0.1.1:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.0-RC9:compile
[INFO] | | | +- com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:compile
[INFO] | | | \- com.netflix.rxjava:rxjava-core:jar:0.20.6:compile
[INFO] | | \- com.netflix.ribbon:ribbon-core:jar:2.0-RC9:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.3.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.6:compile
[INFO] | +- com.sun.jersey:jersey-client:jar:1.13:compile
[INFO] | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.11:compile
[INFO] | +- com.netflix.governator:governator:jar:1.2.10:compile
[INFO] | | +- com.google.inject.extensions:guice-grapher:jar:3.0:compile
[INFO] | | | \- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO] | | +- org.codehaus.jsr166-mirror:jsr166y:jar:1.7.0:compile
[INFO] | | +- com.google.inject:guice:jar:3.0:compile
[INFO] | | +- org.apache.xbean:xbean-finder:jar:3.11.1:compile
[INFO] | | +- asm:asm-all:jar:3.2:compile
[INFO] | | +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO] | | +- org.apache.xbean:xbean-bundleutils:jar:3.11.1:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | \- org.codehaus.jettison:jettison:jar:1.2:runtime
[INFO] | \- stax:stax-api:jar:1.0.1:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.1.8.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-starter-logging:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile
[INFO] | | +- org.slf4j:log4j-over-slf4j:jar:1.7.7:compile
[INFO] | | \- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.55:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:7.0.55:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.55:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.4:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.3.4:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.0.3.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.1.1.GA:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | +- org.springframework:spring-core:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:4.0.7.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:3.2.5.RELEASE:compile
[INFO] | | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:3.2.5.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-web:jar:3.2.5.RELEASE:compile
[INFO] | \- org.springframework:spring-aop:jar:4.0.7.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:1.1.8.RELEASE:test
[INFO] +- junit:junit:jar:4.11:test
[INFO] +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] | \- org.objenesis:objenesis:jar:1.0:test
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] \- org.springframework:spring-test:jar:4.0.7.RELEASE:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.575 s
[INFO] Finished at: 2014-11-11T12:04:14-07:00
[INFO] Final Memory: 16M/310M
[INFO] ------------------------------------------------------------------------
So I did a git clone and mvn package and that was pretty much it. I actually removed it and re-cloned and built again from scratch -> same result When I run mvn dependency:tree, I see this. It is almost the same but seems to add org.mortbay.jetty:jetty:jar:6.1H.22:compile and that brings in the servlet 2.5 stuff. Seems strange why our two dependency trees are slightly different.
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ configserver ---
[INFO] org.demo:configserver:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.cloud:spring-cloud-config-server:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-config-client:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-actuator:jar:1.1.8.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-crypto:jar:3.2.5.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-rsa:jar:1.0.0.M2:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.47:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.47:compile
[INFO] | +- org.eclipse.jgit:org.eclipse.jgit:jar:2.3.1.201302201838-r:compile
[INFO] | | \- com.jcraft:jsch:jar:0.1.46:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.13:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-eureka:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-netflix-core:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | | \- com.google.guava:guava:jar:18.0:compile
[INFO] | \- com.netflix.eureka:eureka-client:jar:1.1.135:compile
[INFO] | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.1.2:compile
[INFO] | | +- org.apache.commons:commons-math:jar:2.2:compile
[INFO] | | +- com.netflix.netflix-commons:netflix-infix:jar:0.1.2:compile
[INFO] | | | +- joda-time:joda-time:jar:2.3:compile
[INFO] | | | +- commons-jxpath:commons-jxpath:jar:1.3:compile
[INFO] | | | +- org.antlr:antlr-runtime:jar:3.4:compile
[INFO] | | | | +- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] | | | | \- antlr:antlr:jar:2.7.7:compile
[INFO] | | | \- com.google.code.gson:gson:jar:2.1:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.2:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- com.netflix.archaius:archaius-core:jar:0.6.0:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.11:compile
[INFO] | | +- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:2.0.0:compile
[INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | +- com.netflix.servo:servo-core:jar:0.7.4:compile
[INFO] | +- com.sun.jersey:jersey-core:jar:1.13:compile
[INFO] | +- com.sun.jersey:jersey-client:jar:1.13:compile
[INFO] | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.3.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.6:compile
[INFO] | +- com.netflix.ribbon:ribbon-httpclient:jar:2.0-RC9:compile
[INFO] | | +- com.netflix.netflix-commons:netflix-commons-util:jar:0.1.1:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.0-RC9:compile
[INFO] | | | +- com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:compile
[INFO] | | | \- com.netflix.rxjava:rxjava-core:jar:0.20.6:compile
[INFO] | | \- com.netflix.ribbon:ribbon-core:jar:2.0-RC9:compile
[INFO] | +- com.netflix.governator:governator:jar:1.2.10:compile
[INFO] | | +- com.google.inject.extensions:guice-grapher:jar:3.0:compile
[INFO] | | | \- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO] | | +- org.codehaus.jsr166-mirror:jsr166y:jar:1.7.0:compile
[INFO] | | +- com.google.inject:guice:jar:3.0:compile
[INFO] | | +- org.apache.xbean:xbean-finder:jar:3.11.1:compile
[INFO] | | +- asm:asm-all:jar:3.2:compile
[INFO] | | +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO] | | +- org.apache.xbean:xbean-bundleutils:jar:3.11.1:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.codehaus.jettison:jettison:jar:1.2:runtime
[INFO] | | \- stax:stax-api:jar:1.0.1:runtime
[INFO] | \- org.mortbay.jetty:jetty:jar:6.1H.22:compile
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1H.22:compile
[INFO] | \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.1.8.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-starter-logging:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile
[INFO] | | +- org.slf4j:log4j-over-slf4j:jar:1.7.7:compile
[INFO] | | \- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.1.8.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.55:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:7.0.55:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.55:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.4:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.3.4:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.0.3.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.1.1.GA:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | +- org.springframework:spring-core:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:4.0.7.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.0.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.1.8.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:4.0.7.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:3.2.5.RELEASE:compile
[INFO] | | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:3.2.5.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-web:jar:3.2.5.RELEASE:compile
[INFO] | \- org.springframework:spring-aop:jar:4.0.7.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:1.1.8.RELEASE:test
[INFO] +- junit:junit:jar:4.11:test
[INFO] +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] | \- org.objenesis:objenesis:jar:1.0:test
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] \- org.springframework:spring-test:jar:4.0.7.RELEASE:test
at this point it looks like a maven issue. Maybe try mvn -U
or delete ~/.m2/repository/org/springframework/cloud
thanks, mvn -U does not produce any different result. Maven is nice but sometimes ..... :)
I have a workaround for what I need to do to get it to work which is to exclude the jetty libs for the eureka cloud starter. Strange but it gets me pass the issue. I will put this down to the vagaries of maven.
Old version of Maven?
I have 3.2.3. But after I dropped my .m2 repository the problem went away. Weird maven issue
Thanks
I am getting this error on startup