I pulled down an 2 years old project and I'm having trouble building the project. I'm getting the following errors:
Error:(57, 29) java: cannot access com.fasterxml.jackson.core.Versioned
class file for com.fasterxml.jackson.core.Versioned not found
and
Error:(58, 29) java: cannot access com.fasterxml.jackson.core.ObjectCodec
class file for com.fasterxml.jackson.core.ObjectCodec not found
This is what I have for dependencies in pom.xml:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-guava</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.1.1</version>
</dependency>
This is where the issue appears to be happening:
@Bean
public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new GuavaModule());
objectMapper.registerModule(new JodaModule());
return objectMapper;
}
I've looked around and tried different versions with no luck.
Am I doing this wrong?
This worked once upon a time. Any help would be appreciated.
~/m2/repository
. What I was suggesting is to delete this wholerepository
directory and relaunch Maven withmvn clean install
. It will redownload every dependency and install them again, making sure there is no corruption somewhere. – Loisloise