java.io.NotSerializableException: java.lang.reflect.Constructor

Hibernate JIRA | Jose Fernando Velez | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When serializing a ComponentType a NotSerializableException is thrown. There is a java.lang.relect.Constructor somewhere that causes the exception. I created a simple JUnit Test that gives me the following stacktrace: java.io.NotSerializableException: java.lang.reflect.Constructor at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at net.pagosonline.v2.internal.orion.ManejadorPersistenciaOrionTest.testSerializarGetAllClassMetadata(ManejadorPersistenciaOrionTest.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 1 decade ago | Jose Fernando Velez
    java.io.NotSerializableException: java.lang.reflect.Constructor
  2. 0

    When serializing a ComponentType a NotSerializableException is thrown. There is a java.lang.relect.Constructor somewhere that causes the exception. I created a simple JUnit Test that gives me the following stacktrace: java.io.NotSerializableException: java.lang.reflect.Constructor at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at net.pagosonline.v2.internal.orion.ManejadorPersistenciaOrionTest.testSerializarGetAllClassMetadata(ManejadorPersistenciaOrionTest.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Hibernate JIRA | 1 decade ago | Jose Fernando Velez
    java.io.NotSerializableException: java.lang.reflect.Constructor
  3. 0

    java.io.NotSerializableException Can't see why I'm getting this

    Oracle Community | 1 decade ago | 843790
    java.io.NotSerializableException: java.lang.reflect.Constructor
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JAVA send Scribble over network

    Stack Overflow | 4 years ago | arbitter
    java.io.NotSerializableException: scribble3.ScribbleCanvasListener
  6. 0

    java.io.NotSerializableException: com.microsoft.sqlserver.jdbc.SQLServerConnection

    Stack Overflow | 4 years ago | ethanjyx
    java.io.NotSerializableException: com.microsoft.sqlserver.jdbc.SQLServerConnection

  1. osvzs 6 times, last 2 weeks ago
  2. Indri Yunita 2 times, last 1 month ago
  3. filpgame 1 times, last 2 months ago
  4. batwalrus76 44 times, last 3 months ago
  5. treefolk 12 times, last 4 months ago
15 more registered users
52 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.io.NotSerializableException

    java.lang.reflect.Constructor

    at java.io.ObjectOutputStream.writeObject0()
  2. Java RT
    ObjectOutputStream.writeObject
    1. java.io.ObjectOutputStream.writeObject0(Unknown Source)
    2. java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    3. java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    4. java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    5. java.io.ObjectOutputStream.writeObject0(Unknown Source)
    6. java.io.ObjectOutputStream.writeObject(Unknown Source)
    6 frames
  3. net.pagosonline.v2
    ManejadorPersistenciaOrionTest.testSerializarGetAllClassMetadata
    1. net.pagosonline.v2.internal.orion.ManejadorPersistenciaOrionTest.testSerializarGetAllClassMetadata(ManejadorPersistenciaOrionTest.java:47)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  5. JUnit
    TestSuite.run
    1. junit.framework.TestCase.runTest(TestCase.java:154)
    2. junit.framework.TestCase.runBare(TestCase.java:127)
    3. junit.framework.TestResult$1.protect(TestResult.java:106)
    4. junit.framework.TestResult.runProtected(TestResult.java:124)
    5. junit.framework.TestResult.run(TestResult.java:109)
    6. junit.framework.TestCase.run(TestCase.java:118)
    7. junit.framework.TestSuite.runTest(TestSuite.java:208)
    8. junit.framework.TestSuite.run(TestSuite.java:203)
    8 frames
  6. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    3 frames