java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable

Spring JIRA | Aaron Loes | 2 years ago
  1. 0

    This appears to be an issue with using SD Rest with SD MongoDB and lazy DBRefs. Given my Farmer class: {code:title=Farmer.java} // this is required for lazy loading as for it to work, SD Rest must use getter methods and not field access. @AccessType(AccessType.Type.PROPERTY) public class Farmer extends PersistentEntity { private String firstName; private String lastName; @DBRef(lazy = true) private Farmer spouse; /* ... getters/setter */ } {code} And when creating an instance of a farmer: {code:title=POST http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers} { "firstName" : "Aaron", "lastName" : "Loes" } {code} {code:title=GET http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1} { "version" : 0, "createdBy" : null, "createdDate" : null, "lastModifiedBy" : null, "lastModifiedDate" : null, "firstName" : "Aaron", "lastName" : "Loes", "_links" : { "self" : { "href" : "http://localhost:8080/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1" }, "spouse" : { "href" : "http://localhost:8080/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1/spouse" } } } {code} All is well until i try to get the farmers spouse: {code:title=GET http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1/spouse} {"cause":null,"message":"Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable"} {code} and this is the exception thrown: {code} 10:00:42.365 [http-bio-8080-exec-8] ERROR o.s.d.r.w.AbstractRepositoryRestController - Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable at org.springframework.util.Assert.isInstanceOf(Assert.java:337) ~[spring-core-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.data.rest.webmvc.support.RepositoryEntityLinks.linkToSingleResource(RepositoryEntityLinks.java:147) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.getSelfLinkFor(PersistentEntityResourceAssembler.java:88) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:64) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:141) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:110) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:464) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:148) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) ~[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) [catalina.jar:7.0.27] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) [catalina.jar:7.0.27] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [catalina.jar:7.0.27] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.27] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) [catalina.jar:7.0.27] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) [tomcat-coyote.jar:7.0.27] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) [tomcat-coyote.jar:7.0.27] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) [tomcat-coyote.jar:7.0.27] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [na:1.7.0_25] {code} It was expected a 404 would have been returned. This does not happen when we are not lazy loading relationships.

    Spring JIRA | 2 years ago | Aaron Loes
    java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable
  2. 0

    This appears to be an issue with using SD Rest with SD MongoDB and lazy DBRefs. Given my Farmer class: {code:title=Farmer.java} // this is required for lazy loading as for it to work, SD Rest must use getter methods and not field access. @AccessType(AccessType.Type.PROPERTY) public class Farmer extends PersistentEntity { private String firstName; private String lastName; @DBRef(lazy = true) private Farmer spouse; /* ... getters/setter */ } {code} And when creating an instance of a farmer: {code:title=POST http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers} { "firstName" : "Aaron", "lastName" : "Loes" } {code} {code:title=GET http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1} { "version" : 0, "createdBy" : null, "createdDate" : null, "lastModifiedBy" : null, "lastModifiedDate" : null, "firstName" : "Aaron", "lastName" : "Loes", "_links" : { "self" : { "href" : "http://localhost:8080/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1" }, "spouse" : { "href" : "http://localhost:8080/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1/spouse" } } } {code} All is well until i try to get the farmers spouse: {code:title=GET http://localhost:808/spring-data-rest-mongo-couchbase-prototype/api/farmers/53ce7a6fab789b1fd8bba7b1/spouse} {"cause":null,"message":"Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable"} {code} and this is the exception thrown: {code} 10:00:42.365 [http-bio-8080-exec-8] ERROR o.s.d.r.w.AbstractRepositoryRestController - Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable at org.springframework.util.Assert.isInstanceOf(Assert.java:337) ~[spring-core-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.data.rest.webmvc.support.RepositoryEntityLinks.linkToSingleResource(RepositoryEntityLinks.java:147) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.getSelfLinkFor(PersistentEntityResourceAssembler.java:88) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:64) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:141) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:110) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:464) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:148) ~[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) ~[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) ~[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.27] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) [catalina.jar:7.0.27] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) [catalina.jar:7.0.27] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [catalina.jar:7.0.27] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) [catalina.jar:7.0.27] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.27] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) [catalina.jar:7.0.27] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) [tomcat-coyote.jar:7.0.27] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) [tomcat-coyote.jar:7.0.27] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) [tomcat-coyote.jar:7.0.27] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [na:1.7.0_25] {code} It was expected a 404 would have been returned. This does not happen when we are not lazy loading relationships.

    Spring JIRA | 2 years ago | Aaron Loes
    java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable
  3. 0

    Id must be assignable to Serializable With LAZY @ManyToOne

    Stack Overflow | 2 years ago | fortm
    java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can't follow property annotated with @DBRef(lazy = true) -SDR

    Stack Overflow | 2 years ago | Stackee007
    java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable
  6. 0

    Hi guys, I'm testing with the latest 2.1.0.BUILD-SNAPSHOT and when I try to open any of these links: http://localhost:8111/rest/product/563845292892480/catalogVersion http://localhost:8111/rest/product/563845292892480/contentUnit http://localhost:8111/rest/product/563845292892480/variantType I get this json: {code} { "cause": null, "message": "Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable" } {code} and this exception in the log: {code} [ERROR] Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable at org.springframework.util.Assert.isInstanceOf(Assert.java:339) at org.springframework.data.rest.webmvc.support.RepositoryEntityLinks.linkToSingleResource(RepositoryEntityLinks.java:147) at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.getSelfLinkFor(PersistentEntityResourceAssembler.java:88) at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:64) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:141) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:110) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:463) at org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:148) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:717) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1632) at com.xxxxx.xxxx.xxxxx.xxxx.xxxxxx.filter.CorsFilter.doFilterInternal(CorsFilter.java:34) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1632) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1624) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) at org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:479) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:459) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:281) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232) at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Thread.java:722) {code}

    Spring JIRA | 3 years ago | Petar Tahchiev
    java.lang.IllegalArgumentException: Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable

  1. tvrmsmith 1 times, last 3 weeks ago
8 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.IllegalArgumentException

    Id must be assignable to Serializable! Object of class [null] must be an instance of interface java.io.Serializable

    at org.springframework.util.Assert.isInstanceOf()
  2. Spring Core
    Assert.isInstanceOf
    1. org.springframework.util.Assert.isInstanceOf(Assert.java:337)[spring-core-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    1 frame
  3. Spring Data REST - WebMVC
    RepositoryPropertyReferenceController.followPropertyReference
    1. org.springframework.data.rest.webmvc.support.RepositoryEntityLinks.linkToSingleResource(RepositoryEntityLinks.java:147)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    2. org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.getSelfLinkFor(PersistentEntityResourceAssembler.java:88)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    3. org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.toResource(PersistentEntityResourceAssembler.java:64)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    4. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:141)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    5. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController$1.apply(RepositoryPropertyReferenceController.java:110)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    6. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.doWithReferencedProperty(RepositoryPropertyReferenceController.java:464)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    7. org.springframework.data.rest.webmvc.RepositoryPropertyReferenceController.followPropertyReference(RepositoryPropertyReferenceController.java:148)[spring-data-rest-webmvc-2.1.1.RELEASE.jar:na]
    7 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_25]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_25]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_25]
    4. java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_25]
    4 frames
  5. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)[spring-web-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    2 frames
  6. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    8 frames
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:621)[servlet-api.jar:na]
    1 frame
  8. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)[spring-webmvc-3.2.10.RELEASE.jar:3.2.10.RELEASE]
    1 frame
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)[servlet-api.jar:na]
    1 frame
  10. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)[catalina.jar:7.0.27]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.27]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)[catalina.jar:7.0.27]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)[catalina.jar:7.0.27]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)[catalina.jar:7.0.27]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)[catalina.jar:7.0.27]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)[catalina.jar:7.0.27]
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)[catalina.jar:7.0.27]
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)[catalina.jar:7.0.27]
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)[catalina.jar:7.0.27]
    10 frames
  11. Grizzly HTTP
    JIoEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)[tomcat-coyote.jar:7.0.27]
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)[tomcat-coyote.jar:7.0.27]
    3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)[tomcat-coyote.jar:7.0.27]
    3 frames
  12. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_25]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_25]
    3. java.lang.Thread.run(Thread.java:724)[na:1.7.0_25]
    3 frames