spring-projects / spring-projects/spring-data-rest

NullPointerExcetion in RepositoryRestMvcConfiguration at startup [DATAREST-1302]

Open
#1,662 1 comment 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 31, 2020.

type: bug
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

crombach opened DATAREST-1302 and commented

I am using Spring Data REST and Spring HATEOAS with Spring Boot 2.1.0.RELEASE. I recently upgraded from Spring Boot 2.0.6.RELEASE.

My application was working just fine with Spring Boot 2.0.6.RELEASE, but after upgrading to the latest version I am seeing a NullPointerException at line 316 of RepositoryRestMvcConfiguration (inside #repositoryRestConfiguration()) at startup time. The configurerDelegate object is null, having never been initialized by #afterPropertiesSet().

I put a breakpoint in #afterPropertiesSet(), but it was not called before the point at which the NPE occurred. It seems that the beans in the class cannot be properly initialized because of this.

Downgrading to Spring Boot 2.0.6.RELEASE (and the accompanying Spring Data REST version) resolves the issue


Affects: 3.1.2 (Lovelace SR2)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.