java.lang.ClassCastException: sun.reflect.GeneratedSerializationConstructorAccessor5 cannot be cast to sun.reflect.SerializationConstructorAccessorImpl

Stack Overflow | alk453 | 5 months ago
  1. 0

    Java deserialzation throwing ClassCastException in Jetty server

    Stack Overflow | 5 months ago | alk453
    java.lang.ClassCastException: sun.reflect.GeneratedSerializationConstructorAccessor5 cannot be cast to sun.reflect.SerializationConstructorAccessorImpl
  2. 0

    Spark 1.6.0 throwing classcast exception in Cluster Mode works fine in local mode

    Stack Overflow | 10 months ago | Rahul Shukla
    java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.List$SerializationProxy to field org.apache.spark.rdd.RDD.org$apache$spark$rdd$RDD$$dependencies_ of type scala.collection.Seq in instance of org.apache.spark.rdd.MapPartitionsRDD
  3. 0

    com.esotericsoftware.kryo.KryoException

    GitHub | 2 years ago | security08
    java.lang.ClassCastException: cannot assign instance of com.cloudera.oryx.lambda.ValueToWritableFunction to field org.apache.spark.api.java.JavaPairRDD$$anonfun$pairFunToScalaFun$1.x$335 of type org.apache.spark.api.java.function.PairFunction in instance of org.apache.spark.api.java.JavaPairRDD$$anonfun$pairFunToScalaFun$1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Serialization for ImmutableMap (and probably others) class fails with circular graphs.

    GitHub | 2 years ago | gissuebot
    java.lang.ClassCastException: cannot assign instance of com.google.common.collect.ImmutableBiMap$SerializedForm to field ImmutableMapSerialization.map of type com.google.common.collect.ImmutableMap in instance of ImmutableMapSerialization
  6. 0

    Hitting ClassCastException to String

    Stack Overflow | 3 years ago | tM --
    java.lang.ClassCastException: cannot assign instance of [CLASS 1] to field [CLASS 2].name of type java.lang.String in instance of [CLASS 2]

  1. bpbhat77 2 times, last 4 months ago
  2. shiva768 1 times, last 11 months ago
11 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

    sun.reflect.GeneratedSerializationConstructorAccessor5 cannot be cast to sun.reflect.SerializationConstructorAccessorImpl

    at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor()
  2. Java RT
    ObjectInputStream.readObject
    1. sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:112)
    2. sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:340)
    3. java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1420)
    4. java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
    5. java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:497)
    6. java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:472)
    7. java.security.AccessController.doPrivileged(Native Method)
    8. java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:472)
    9. java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:369)
    10. java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:598)
    11. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
    12. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
    13. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
    14. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    15. java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
    15 frames
  3. com.abc.gw
    QController.forward
    1. com.abc.gw.common.Utils.deserialize(Utils.java:14)
    2. com.abc.gw.service.QController.forward(QController.java:38)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  5. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
    2 frames
  6. Spring MVC
    FrameworkServlet.doPost
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
    8 frames
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    1 frame
  8. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    1 frame
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    1 frame
  10. Jetty
    QueuedThreadPool$3.run
    1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
    3. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    4. org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    5. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    6. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    7. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    8. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    9. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    10. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    11. org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    12. org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    13. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    14. org.eclipse.jetty.server.Server.handle(Server.java:499)
    15. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    16. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    17. org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    18. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    19. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    19 frames
  11. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame