java.lang.IllegalArgumentException: Could not determine a repository key from /unites/search/with_params.

Spring JIRA | Sylvain LB | 2 months ago
  1. 1

    Hello, I have this following code in my application : {code:java} @RepositoryRestController @RequestMapping("unites") @ExposesResourceFor(Unite.class) public class UniteController { .... @ResponseBody @RequestMapping(value = "/search/with_params", method = RequestMethod.GET) public PagedResources<?> searchWithParams(@Param("code") final String code ....) final Pageable pageRequest) { final Page<Unite> pages = uniteRepository.searchWithParams(code, designation, date, pageRequest); if (pages.hasContent()) { return assembler.toResource(pages); } return assembler.toEmptyResource(pages, Unite.class, null); } } {code} Seem like there is a regression with the last version of spring-boot@1.4.1 : With spring-data-rest-webmvc@2.5.3, I have got this error while asking the url {noformat} java.lang.IllegalArgumentException: Could not determine a repository key from /unites/search/with_params. at org.springframework.data.rest.webmvc.support.DomainClassResolver.resolve(DomainClassResolver.java:64) at org.springframework.data.rest.webmvc.json.JacksonMappingAwareSortTranslator.translateSort(JacksonMappingAwareSortTranslator.java:66) at org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver.resolveArgument(MappingAwarePageableArgumentResolver.java:72) at org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver.resolveArgument(MappingAwarePageableArgumentResolver.java:43) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:161) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:128) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) {noformat}

    Spring JIRA | 2 months ago | Sylvain LB
    java.lang.IllegalArgumentException: Could not determine a repository key from /unites/search/with_params.
  2. 0

    NFO Premiered date error

    GitHub | 2 years ago | Omertron
    java.lang.IllegalArgumentException: Could not determine Year, Month, and Day from '1937'
  3. 0

    GitHub comment 938#168480967

    GitHub | 11 months ago | nitinverma
    java.lang.IllegalArgumentException: Could not determine java version from '9-ea'.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Slf4j: Classpath Contains Multiple Slf4j Bindings Error While Starting Jboss

    wpthm.com | 1 year ago
    java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
  6. 0

    Can't use Arquillian with remote WL

    Stack Overflow | 3 years ago | Hendrik Ebbers
    java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.

    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.IllegalArgumentException

      Could not determine a repository key from /unites/search/with_params.

      at org.springframework.data.rest.webmvc.support.DomainClassResolver.resolve()
    2. Spring Data REST - WebMVC
      MappingAwarePageableArgumentResolver.resolveArgument
      1. org.springframework.data.rest.webmvc.support.DomainClassResolver.resolve(DomainClassResolver.java:64)
      2. org.springframework.data.rest.webmvc.json.JacksonMappingAwareSortTranslator.translateSort(JacksonMappingAwareSortTranslator.java:66)
      3. org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver.resolveArgument(MappingAwarePageableArgumentResolver.java:72)
      4. org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver.resolveArgument(MappingAwarePageableArgumentResolver.java:43)
      4 frames
    3. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
      2. org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:161)
      3. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:128)
      3 frames
    4. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
      8 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      1 frame
    6. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      1 frame
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      1 frame