Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Code between sessionFactory.openSession() and session.close():
Session xmlSession = s.getSession(EntityMode.DOM4J);
Element nc = (Element)xmlSession.load(Nc.class, ncId);
Full stack trace of any exception that occurs:org.hibernate.WrongClassException: Object with id: 1191 was not of the specified subclass: Audit0 (loaded object was of wrong class)
at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890)
at org.hibernate.loader.Loader.getRow(Loader.java:846)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305)
at org.hibernate.loader.Loader.doQuery(Loader.java:412)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1434)
at org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430)
at org.hibernate.type.CollectionType.getCollection(CollectionType.java:484)
Name and version of the database you are using:
Oracle 10g
Bonjour,
Comment faire pour charger l'xml d'un objet persistant qui a déjà été chargé ? Il semble bloquer sur tous les fils qui ont déjà été chargés.
Changer le LockMode ne change rien.