ewolff / microservice

Sample of a Microservice setup for my book. Based on Spring Cloud / Netflix / Java / Docker / Docker Compose / Docker Machine / Vagrant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eureka Tests fail with Java 9

chaitan64arun opened this issue · comments

Any new members using Java 9 to test this project, you might encounter test failures like below.

org.springframework.web.client.HttpClientErrorException: 404 null
	at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91)
	at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
	at org.springframework.web.client.RestTemplate.getForEntity(RestTemplate.java:312)
	at com.ewolff.microservice.eurekaserver.ApplicationTests.catalogLoads(ApplicationTests.java:25)

The root cause is java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present.
Refer Java 9 explanationhere

So just down grade your JDK to work until there is a fix available.

Thanks for pointing this out!

Thanks! I fixed it with 5a74df2 .