java.io.InvalidObjectException: Could not find a SessionFactory named: null

Hibernate JIRA | TURIN ACCOUNT | 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 Tomcat reloads an app context, the SessionFactory and its Sessions are loaded from the HttpSession files. I thought this would be fixed with the "null" in the UUIDGenerator fix, but it still throws an Exception on context restart. Everything else works fine, so no showstopper. StandardManager[]: Seeding random number generator class java.security.SecureRandom StandardManager[]: Seeding of random number generator has been completed APP - WARN - SessionFactoryObjectFactory - Not found: ff808081f64e8ea500f64e8ea78e0000 APP - WARN - SessionFactoryObjectFactory - Not found: null StandardManager[] IOException while loading persisted sessions: java.io.InvalidObjectException: Could not find a SessionFactory named: null java.io.InvalidObjectException: Could not find a SessionFactory named: null at net.sf.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:526) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:348) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1369) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:864) at org.apache.catalina.session.StandardManager.load(StandardManager.java:440) at org.apache.catalina.session.StandardManager.start(StandardManager.java:655) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572) at org.apache.catalina.loader.WebappLoader$WebappContextNotifier.run(WebappLoader.java:1369) at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | TURIN ACCOUNT
    java.io.InvalidObjectException: Could not find a SessionFactory named: null
  2. 0

    When Tomcat reloads an app context, the SessionFactory and its Sessions are loaded from the HttpSession files. I thought this would be fixed with the "null" in the UUIDGenerator fix, but it still throws an Exception on context restart. Everything else works fine, so no showstopper. StandardManager[]: Seeding random number generator class java.security.SecureRandom StandardManager[]: Seeding of random number generator has been completed APP - WARN - SessionFactoryObjectFactory - Not found: ff808081f64e8ea500f64e8ea78e0000 APP - WARN - SessionFactoryObjectFactory - Not found: null StandardManager[] IOException while loading persisted sessions: java.io.InvalidObjectException: Could not find a SessionFactory named: null java.io.InvalidObjectException: Could not find a SessionFactory named: null at net.sf.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:526) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:348) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1369) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:864) at org.apache.catalina.session.StandardManager.load(StandardManager.java:440) at org.apache.catalina.session.StandardManager.start(StandardManager.java:655) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572) at org.apache.catalina.loader.WebappLoader$WebappContextNotifier.run(WebappLoader.java:1369) at java.lang.Thread.run(Thread.java:536)

    Hibernate JIRA | 1 decade ago | TURIN ACCOUNT
    java.io.InvalidObjectException: Could not find a SessionFactory named: null
  3. 0

    Hi, I have an application that is working fine. In order to be more productive I am trying to use the hot-deployment feature for the first time. My app. server is BEA weblogic 7.0 and I use Hibernate2.13. Problem: When I hot-deploy I get the exception detailed below. I am new to this forum any pointers or help is greatly appreciated. TIA. -Nagaraj ----Exception during Hot-Deployment------------------ [java] <Jul 7, 2004 10:17:52 AM CDT> <Error> <HTTP Session> <100028> <Could not deserialize ses sion data [java] java.io.InvalidObjectException: Could not find a SessionFactory named: sessionFactory [java] at net.sf.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:399) [java] at java.lang.reflect.Method.invoke(Native Method) [java] at java.io.ObjectStreamClass.invokeMethod(ObjectStreamClass.java:1610) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:388) [java] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258) [java] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514) [java] at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:460) [java] at java.lang.reflect.Method.invoke(Native Method) [java] at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2209) [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1406) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) [java] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258) [java] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514) [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) [java] at java.util.ArrayList.readObject(ArrayList.java:526) [java] at java.lang.reflect.Method.invoke(Native Method) [java] at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2209) [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1406) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) [java] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258) [java] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514) [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) [java] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258) [java] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514) [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381) [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231) [java] at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:104) [java] at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:66) [java] at weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:60 3) [java] at weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:58 5) [java] at weblogic.servlet.internal.session.SessionData.remove(SessionData.java:767) [java] at weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(MemorySe ssionContext.java:61) [java] at weblogic.servlet.internal.session.SessionContext$InvalidationAction.run(SessionCo ntext.java:536) [java] at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.jav a:685) [java] at weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupExpire dSessions(SessionContext.java:456) [java] at weblogic.servlet.internal.session.SessionContext.deleteInvalidSessions(SessionCon text.java:83) [java] at weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(Sessi onContext.java:404) [java] at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:181) [java] at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.jav a:685) [java] at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.ja va:167) [java] at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:161) [java] at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:39) [java] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234) [java] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210) [java] >

    Hibernate JIRA | 1 decade ago
    java.io.InvalidObjectException: Could not find a SessionFactory named: sessionFactory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.InvalidObjectException

      Could not find a SessionFactory named: null

      at net.sf.hibernate.impl.SessionFactoryImpl.readResolve()
    2. net.sf.hibernate
      SessionFactoryImpl.readResolve
      1. net.sf.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:526)
      1 frame
    3. Java RT
      ObjectInputStream.defaultReadObject
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      5. java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911)
      6. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
      7. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      8. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
      9. java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452)
      9 frames
    4. net.sf.hibernate
      SessionImpl.readObject
      1. net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:348)
      1 frame
    5. Java RT
      ObjectInputStream.readObject
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      5. java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)
      6. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
      7. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      8. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      9. java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      9 frames
    6. Glassfish Core
      WebappLoader$WebappContextNotifier.run
      1. org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1369)
      2. org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:864)
      3. org.apache.catalina.session.StandardManager.load(StandardManager.java:440)
      4. org.apache.catalina.session.StandardManager.start(StandardManager.java:655)
      5. org.apache.catalina.core.StandardContext.reload(StandardContext.java:2572)
      6. org.apache.catalina.loader.WebappLoader$WebappContextNotifier.run(WebappLoader.java:1369)
      6 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:536)
      1 frame