java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String

Stack Overflow | Alessandro C | 4 months ago
  1. 0

    WSO2 ESB - From VFS to JMS MessageStore

    Stack Overflow | 3 years ago | elPrez1983
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
  2. 0

    How do you prepopulate an IT Resource field?

    Oracle Community | 7 years ago | 703604
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Classcast exception when running FullTest for Firefox 25

    GitHub | 3 years ago | soulgalore
    java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
  5. 0

    Struts 2 TypeConversion issue

    Stack Overflow | 7 years ago
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String

    1 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.ClassCastException

      java.lang.Long cannot be cast to java.lang.String

      at org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository.stringIdRepresentation()
    2. Spring Data Elasticsearch
      AbstractElasticsearchRepository.save
      1. org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository.stringIdRepresentation(SimpleElasticsearchRepository.java:28)[spring-data-elasticsearch-2.0.2.RELEASE.jar:na]
      2. org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.createIndexQuery(AbstractElasticsearchRepository.java:255)[spring-data-elasticsearch-2.0.2.RELEASE.jar:na]
      3. org.springframework.data.elasticsearch.repository.support.AbstractElasticsearchRepository.save(AbstractElasticsearchRepository.java:142)[spring-data-elasticsearch-2.0.2.RELEASE.jar:na]
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_65]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_65]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_65]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_65]
      4 frames
    4. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:503)[spring-data-commons-1.12.2.RELEASE.jar:na]
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:488)[spring-data-commons-1.12.2.RELEASE.jar:na]
      3. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:460)[spring-data-commons-1.12.2.RELEASE.jar:na]
      3 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    6. org.springframework.data
      DefaultMethodInvokingMethodInterceptor.invoke
      1. org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)[spring-data-commons-1.12.2.RELEASE.jar:na]
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4 frames
    8. com.sun.proxy
      $Proxy92.save
      1. com.sun.proxy.$Proxy92.save(Unknown Source)[na:na]
      1 frame
    9. Spring Data Core
      CrudRepositoryInvoker.invokeSave
      1. org.springframework.data.repository.support.CrudRepositoryInvoker.invokeSave(CrudRepositoryInvoker.java:100)[spring-data-commons-1.12.2.RELEASE.jar:na]
      1 frame
    10. Spring Data REST - Core
      UnwrappingRepositoryInvokerFactory$UnwrappingRepositoryInvoker.invokeSave
      1. org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory$UnwrappingRepositoryInvoker.invokeSave(UnwrappingRepositoryInvokerFactory.java:222)[spring-data-rest-core-2.5.2.RELEASE.jar:na]
      1 frame
    11. Spring Data REST - WebMVC
      RepositoryEntityController.postCollectionResource
      1. org.springframework.data.rest.webmvc.RepositoryEntityController.createAndReturn(RepositoryEntityController.java:501)[spring-data-rest-webmvc-2.5.2.RELEASE.jar:na]
      2. org.springframework.data.rest.webmvc.RepositoryEntityController.postCollectionResource(RepositoryEntityController.java:275)[spring-data-rest-webmvc-2.5.2.RELEASE.jar:na]
      2 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_65]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_65]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_65]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_65]
      4 frames
    13. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    14. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      8 frames
    15. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)[tomcat-embed-core-8.5.4.jar:8.5.4]
      1 frame
    16. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)[spring-webmvc-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    17. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-embed-core-8.5.4.jar:8.5.4]
      1 frame
    18. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2 frames
    19. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-embed-websocket-8.5.4.jar:8.5.4]
      1 frame
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2 frames
    21. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    22. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2 frames
    23. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    24. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2 frames
    25. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    26. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2 frames
    27. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    28. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.4.jar:8.5.4]
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)[tomcat-embed-core-8.5.4.jar:8.5.4]
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)[tomcat-embed-core-8.5.4.jar:8.5.4]
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)[tomcat-embed-core-8.5.4.jar:8.5.4]
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)[tomcat-embed-core-8.5.4.jar:8.5.4]
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.5.4.jar:8.5.4]
      8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)[tomcat-embed-core-8.5.4.jar:8.5.4]
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)[tomcat-embed-core-8.5.4.jar:8.5.4]
      9 frames
    29. Grizzly HTTP
      SocketProcessorBase.run
      1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)[tomcat-embed-core-8.5.4.jar:8.5.4]
      2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-8.5.4.jar:8.5.4]
      3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)[tomcat-embed-core-8.5.4.jar:8.5.4]
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)[tomcat-embed-core-8.5.4.jar:8.5.4]
      5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcat-embed-core-8.5.4.jar:8.5.4]
      5 frames
    30. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_65]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_65]
      2 frames
    31. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.5.4.jar:8.5.4]
      1 frame
    32. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_65]
      1 frame