java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;

Spring JIRA | Petar Tahchiev | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hello, I'm using {{Gosling-M1}} and when I call: https://localhost:8112/storefront/rest/product/564472715204160/filters on a product that has no filters I get a 500 status code with this exception: {code} 2015-06-09 18:13:59,472 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[restDispatcherServlet] [http-nio-8112-exec-1] ERROR: Servlet.service() for servlet [restDispatcherServlet] in context with path [/storefront] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;] with root cause java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper; at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:136) at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.toResources(AbstractRepositoryRestController.java:90) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:128) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:117) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:444) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:149) at sun.reflect.GeneratedMethodAccessor370.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) {code}

    Spring JIRA | 2 years ago | Petar Tahchiev
    java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;
  2. 0

    Hello, I'm using {{Gosling-M1}} and when I call: https://localhost:8112/storefront/rest/product/564472715204160/filters on a product that has no filters I get a 500 status code with this exception: {code} 2015-06-09 18:13:59,472 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/storefront].[restDispatcherServlet] [http-nio-8112-exec-1] ERROR: Servlet.service() for servlet [restDispatcherServlet] in context with path [/storefront] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;] with root cause java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper; at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:136) at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.toResources(AbstractRepositoryRestController.java:90) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:128) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:117) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:444) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:149) at sun.reflect.GeneratedMethodAccessor370.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857) {code}

    Spring JIRA | 2 years ago | Petar Tahchiev
    java.lang.NoSuchMethodError: org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.hateoas.core.EmbeddedWrappers.emptyCollectionOf(Ljava/lang/Class;)Lorg/springframework/hateoas/core/EmbeddedWrapper;

      at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources()
    2. Spring Data REST - WebMVC
      RepositoryPropertyReferenceController.followPropertyReference
      1. org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:136)
      2. org.springframework.data.rest.webmvc.AbstractRepositoryRestController.toResources(AbstractRepositoryRestController.java:90)
      3. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:128)
      4. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:117)
      5. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:444)
      6. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:149)
      6 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor370.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:497)
      3 frames
    4. Springloaded
      ReflectiveInterceptor.jlrMethodInvoke
      1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
      1 frame
    5. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
      2 frames
    6. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
      8 frames