java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String

GitHub | DavidLeoni | 11 months 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

    ClassCastException: LinkedHashMap cannot be cast to String

    GitHub | 11 months ago | DavidLeoni
    java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.util.LinkedHashMap cannot be cast to java.lang.String

      at it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.syncValue()
    2. it.unitn.disi
      InstanceAdapter.create
      1. it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.syncValue(ValueTranslator.java:297)
      2. it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.syncSource(ValueTranslator.java:257)
      3. it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.translateTarget(ValueTranslator.java:124)
      4. it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.syncValues(AttributeTranslator.java:180)
      5. it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.syncSource(AttributeTranslator.java:165)
      6. it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.translateTarget(AttributeTranslator.java:146)
      7. it.unitn.disi.sweb.webapi.server.translators.impl.InstanceTranslator.syncAttributes(InstanceTranslator.java:86)
      8. it.unitn.disi.sweb.webapi.server.translators.impl.InstanceTranslator.syncSource(InstanceTranslator.java:73)
      9. it.unitn.disi.sweb.webapi.server.translators.impl.EntityTranslator.syncSource(EntityTranslator.java:46)
      10. it.unitn.disi.sweb.webapi.server.translators.impl.EntityTranslator.syncSource(EntityTranslator.java:33)
      11. it.unitn.disi.sweb.webapi.server.translators.impl.AbstractTranslator.translateTarget(AbstractTranslator.java:39)
      12. it.unitn.disi.sweb.webapi.server.adapters.impl.AbstractEntityAdapter.create(AbstractEntityAdapter.java:149)
      13. it.unitn.disi.sweb.webapi.server.adapters.impl.InstanceAdapter.create(InstanceAdapter.java:99)
      14. it.unitn.disi.sweb.webapi.server.adapters.impl.InstanceAdapter.create(InstanceAdapter.java:45)
      14 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3 frames
    5. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      3 frames
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    7. com.sun.proxy
      $Proxy118.create
      1. com.sun.proxy.$Proxy118.create(Unknown Source)
      1 frame
    8. it.unitn.disi
      InstanceController.create
      1. it.unitn.disi.sweb.webapi.server.controllers.InstanceController.create(InstanceController.java:500)
      1 frame
    9. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor470.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    10. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
      2 frames
    11. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
      8 frames
    12. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      1 frame
    13. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
      1 frame
    14. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      1 frame
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    16. it.unitn.disi
      HeadersFilter.doFilterInternal
      1. it.unitn.disi.sweb.webapi.server.utils.HeadersFilter.doFilterInternal(HeadersFilter.java:72)
      1 frame
    17. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      3. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      3 frames
    18. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    19. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    21. Jetty
      GzipFilter.doFilter
      1. org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
      2. org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:256)
      2 frames
    22. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      10 frames
    23. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      3 frames
    24. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames