java.lang.IllegalStateException: Could not find current request via RequestContextHolder. Is this being called from a Spring MVC handler?

Spring JIRA | Hugh Hamill | 1 year ago
  1. 0

    Using Springfox to document jax-rs services in a Spring app

    Stack Overflow | 1 year ago | Don Branson
    java.lang.IllegalStateException: Could not find current request via RequestContextHolder. Is this being called from a Spring MVC handler?
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Error while Implementing HATEOAS in Spring

    Stack Overflow | 3 years ago | Sunil Ks
    java.lang.IllegalStateException: Could not find current request via RequestContextHolder

  1. tvrmsmith 2 times, last 3 weeks ago
  2. tvrmsmith 4 times, last 2 months ago
  3. schoetty 8 times, last 7 months ago
  4. Александр Пастухов 1 times, last 7 months ago
48 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Could not find current request via RequestContextHolder. Is this being called from a Spring MVC handler?

    at org.springframework.util.Assert.state()
  2. Spring Core
    Assert.state
    1. org.springframework.util.Assert.state(Assert.java:392)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame
  3. Spring Hateoas
    ControllerLinkBuilder.linkTo
    1. org.springframework.hateoas.mvc.ControllerLinkBuilder.getCurrentRequest(ControllerLinkBuilder.java:242)[spring-hateoas-0.19.0.RELEASE.jar:na]
    2. org.springframework.hateoas.mvc.ControllerLinkBuilder.getBuilder(ControllerLinkBuilder.java:189)[spring-hateoas-0.19.0.RELEASE.jar:na]
    3. org.springframework.hateoas.mvc.ControllerLinkBuilderFactory.linkTo(ControllerLinkBuilderFactory.java:121)[spring-hateoas-0.19.0.RELEASE.jar:na]
    4. org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo(ControllerLinkBuilder.java:138)[spring-hateoas-0.19.0.RELEASE.jar:na]
    4 frames