spring-projects / spring-projects/spring-hateoas
Error throws java.lang.NoClassDefFoundError: org/springframework/hateoas/Identifiable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
I updated the spring boot version as 2.7.1 and Hateos as 1.5.1. Jackson-databind as 2.13.3
`<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.13.3</version>
</dependency>`
After upgrading the version, I am getting java.lang.NoClassDefFoundError: org/springframework/hateoas/Identifiable exception when trying to call objectMapper.readValue method.
objectMapper.readValue(json, aClass);
aClass contains the following properties
private Links links;
private Products products;
I think the problem with links properties. When I am trying to map the response with model class getting this error.
I am calling the some of the rest service with MediaType.valueOf("application/hal+json") and map with respective model class.
It worked with previous versions. Can you please guide?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the declared Spring Boot, Spring HATEOAS, and Jackson versions, then trace the objectMapper.readValue(json, aClass) path with a model containing Links and Products. Done means the HAL response can be mapped without the NoClassDefFoundError and the compatible dependency combination is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100