java.lang.IllegalArgumentException

Can not set java.lang.Long field domain.UserEntity.id to java.lang.String

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web18589

  • via Spring JIRA by Billy Yarosh, 1 year ago
    Can not set java.lang.Long field domain.UserEntity.id to java.lang.String
  • via Spring JIRA by Billy Yarosh, 11 months ago
    Can not set java.lang.Long field domain.UserEntity.id to java.lang.String
  • via Kuali JIRA by Lora Headdy-Fox, 1 year ago
    Can not set java.lang.String field org.kuali.hr.time.roles.TkRole.department to java.lang.Long
  • Stack trace

    • java.lang.IllegalArgumentException: Can not set java.lang.Long field domain.UserEntity.id to java.lang.String at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)[na:1.8.0_31] at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)[na:1.8.0_31] at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)[na:1.8.0_31] at java.lang.reflect.Field.set(Field.java:758)[na:1.8.0_31] at org.springframework.util.ReflectionUtils.setField(ReflectionUtils.java:108)[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.data.mapping.model.BeanWrapper.setProperty(BeanWrapper.java:74)[spring-data-commons-1.10.0.RELEASE.jar:na] at org.springframework.data.rest.webmvc.RepositoryEntityController.putItemResource(RepositoryEntityController.java:312)[spring-data-rest-webmvc-2.2.2.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_31] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_31] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_31] at java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_31] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:879)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)[spring-webmvc-4.1.6.RELEASE.jar:4.1.6.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-embed-websocket-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)[tomcat-embed-core-8.0.20.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)[tomcat-embed-core-8.0.20.jar:8.0.20] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_31] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.0.20.jar:8.0.20] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_31]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    7 times, 6 months ago
    6 times, 2 weeks ago
    Unknown user
    Once, 1 month ago
    5 times, 2 months ago
    8 times, 5 months ago
    61 more bugmates