Reputation: 2163
I'm trying to run this project test class (SurveyControllerIT) and I'm getting this error below. I already tried a few things without success.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.data.rest.SpringBootRepositoryRestMvcConfiguration': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationException
Source code: source
Upvotes: 1
Views: 1362
Reputation: 12180
You are missing a dependency. Try to add this to your pom (if you are using maven):
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
You might have to supply a version as well, but I think it might be inherited from the Spring Boot parent.
Upvotes: 1