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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by DavidLeoni
, 1 year ago
java.util.LinkedHashMap cannot be cast to java.lang.String
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String
at it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.syncValue(ValueTranslator.java:297)
at it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.syncSource(ValueTranslator.java:257)
at it.unitn.disi.sweb.webapi.server.translators.impl.ValueTranslator.translateTarget(ValueTranslator.java:124)
at it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.syncValues(AttributeTranslator.java:180)
at it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.syncSource(AttributeTranslator.java:165)
at it.unitn.disi.sweb.webapi.server.translators.impl.AttributeTranslator.translateTarget(AttributeTranslator.java:146)
at it.unitn.disi.sweb.webapi.server.translators.impl.InstanceTranslator.syncAttributes(InstanceTranslator.java:86)
at it.unitn.disi.sweb.webapi.server.translators.impl.InstanceTranslator.syncSource(InstanceTranslator.java:73)
at it.unitn.disi.sweb.webapi.server.translators.impl.EntityTranslator.syncSource(EntityTranslator.java:46)
at it.unitn.disi.sweb.webapi.server.translators.impl.EntityTranslator.syncSource(EntityTranslator.java:33)
at it.unitn.disi.sweb.webapi.server.translators.impl.AbstractTranslator.translateTarget(AbstractTranslator.java:39)
at it.unitn.disi.sweb.webapi.server.adapters.impl.AbstractEntityAdapter.create(AbstractEntityAdapter.java:149)
at it.unitn.disi.sweb.webapi.server.adapters.impl.InstanceAdapter.create(InstanceAdapter.java:99)
at it.unitn.disi.sweb.webapi.server.adapters.impl.InstanceAdapter.create(InstanceAdapter.java:45)
at sun.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at com.sun.proxy.$Proxy118.create(Unknown Source)
at it.unitn.disi.sweb.webapi.server.controllers.InstanceController.create(InstanceController.java:500)
at sun.reflect.GeneratedMethodAccessor470.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
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:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at it.unitn.disi.sweb.webapi.server.utils.HeadersFilter.doFilterInternal(HeadersFilter.java:72)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.