-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Adding a column to DB breaks subclass queries
PostPosted: Mon Oct 02, 2006 7:07 pm 
Newbie

Joined: Wed Nov 02, 2005 1:17 pm
Posts: 13
I've attempted to add a single column to an existing Hibernate created DB table that is associated with the root class of a inheritance hierarchy ( i'm using "table per subclass" strategy for inheritance). I manually added a simple column to the exisiting root table ABSTRACT_E3_ELEMENT via toad:
Quote:
column name: CONCRETE_TYPE
data type: number(10)

I then added the following line to the mapping file for AbstractE3Element:
Quote:
<property name="concreteType" column="CONCRETE_TYPE"/>

and finally added the getter/setters to AbstractE3Element.java
Quote:
public int getConcreteType() {
return concreteType;
}

public void setConcreteType(int concreteType) {
this.concreteType = concreteType;
}

Now executing a simple query of the subclass, which prior to the modification worked fine, causes a hibernate exeception with the cryptic message:
Quote:
org.hibernate.HibernateException:"A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: gov.llnl.e3.model.BENum.Datasets"

I can drop and rebuild the DB using the same modified mapping and java with no problem, however, in a production environment I don't have the luxury of dropping & rebuilding.. I need to be able to add extensions to the data model in place, without dropping all the data.
Help
Hibernate version: 3.1.3

Mapping documents:
Code:
<hibernate-mapping>
   <class name="gov.llnl.e3.model.AbstractE3Element" table="ABSTRACT_E3_ELEMENT">
      <id name="id" column="ID" type="long">
         <generator class="native"/>
      </id>
      <property name="concreteType" column="CONCRETE_TYPE"/>
         
   </class>
</hibernate-mapping>

Code:
<hibernate-mapping>
   <joined-subclass name="gov.llnl.e3.model.BENum" table="BE_NUM" extends="gov.llnl.e3.model.AbstractE3Element">
      <key column="ID"/>
      <set name="Datasets" lazy="true" cascade="all, delete-orphan" inverse="true">
         <key column="BENUM_ID"/>
         <one-to-many class="gov.llnl.e3.model.AbstractDataset"/>
      </set>
      <property name="bePrefix" column="BE_PREFIX" not-null="true"/>
      <property name="beSuffix" column="BE_SUFFIX"/>
      <property name="targetName" column="TARGET_NAME" not-null="true"/>
      <property name="centroid" type="gov.llnl.e3.model.GeometryUserType" not-null="true">
         <column name="CENTROID" sql-type="sdo_geometry"/>
      </property>
      <many-to-one name="defaultImage" column="DEFAULT_IMAGE_ID"/>
      <many-to-one name="countryCode" column="COUNTRY_CODE_ID" not-null="true"/>
   </joined-subclass>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
   startTransaction();
   List beNums = session.createQuery("from BENum").list();
   for (Iterator iter = beNums.iterator(); iter.hasNext();)
      items.add((BENum) iter.next());
   endTransaction();
   } catch (HibernateException e) {
      endTransaction();
      throw new E3DatabaseAccessException("Error while attempting to get all BENums.", e);
   }

Full stack trace of any exception that occurs:
see debug level log
Name and version of the database you are using:
Oracle 10g
The generated SQL (show_sql=true):
btw this works in SQLPlus
Code:
select benum0_.ID as ID0_,
      benum0_1_.CONCRETE_TYPE as CONCRETE2_0_,
      benum0_.BE_PREFIX as BE2_8_,
      benum0_.BE_SUFFIX as BE3_8_,
      benum0_.TARGET_NAME as TARGET4_8_,
      benum0_.CENTROID as CENTROID8_,
      benum0_.DEFAULT_IMAGE_ID as DEFAULT6_8_,
      benum0_.COUNTRY_CODE_ID as COUNTRY7_8_
from BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID


Debug level Hibernate log excerpt:
Code:
[02-Oct-2006 15:58:49] 429672 [main] DEBUG (SessionImpl.java:829) - find: from BENum
[02-Oct-2006 15:58:49] 429672 [main] DEBUG (QueryParameters.java:224) - named parameters: {}
[02-Oct-2006 15:58:49] 429672 [main] DEBUG (QueryTranslatorImpl.java:207) - parse() - HQL: from gov.llnl.e3.model.BENum
[02-Oct-2006 15:58:49] 429672 [main] DEBUG (QueryTranslatorImpl.java:223) - --- HQL AST ---
\-[QUERY] 'query'
    \-[SELECT_FROM] 'SELECT_FROM'
       \-[FROM] 'from'
          \-[RANGE] 'RANGE'
             \-[DOT] '.'
                +-[DOT] '.'
                |  +-[DOT] '.'
                |  |  +-[DOT] '.'
                |  |  |  +-[IDENT] 'gov'
                |  |  |  \-[IDENT] 'llnl'
                |  |  \-[IDENT] 'e3'
                |  \-[IDENT] 'model'
                \-[IDENT] 'BENum'

[02-Oct-2006 15:58:49] 429687 [main] DEBUG (ErrorCounter.java:72) - throwQueryException() : no errors
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (HqlSqlBaseWalker.java:120) - query() << begin, level = 1
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (FromElement.java:88) - FromClause{level=1} :  gov.llnl.e3.model.BENum (no alias) -> benum0_
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (HqlSqlBaseWalker.java:125) - query() : finishing up , level = 1
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (HqlSqlWalker.java:331) - processQuery() :  ( SELECT ( FromClause{level=1} BE_NUM benum0_ ) )
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (HqlSqlWalker.java:451) - Derived SELECT clause created.
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (JoinProcessor.java:112) - Using FROM fragment [BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID]
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (HqlSqlBaseWalker.java:128) - query() >> end, level = 1
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (QueryTranslatorImpl.java:193) - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (ABSTRACT_E3_ELEMENT,BE_NUM)
    +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
    |  +-[SELECT_EXPR] SelectExpressionImpl: 'benum0_.ID as ID' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=BE_NUM,tableAlias=benum0_,colums={,className=gov.llnl.e3.model.BENum}}}
    |  \-[SQL_TOKEN] SqlFragment: 'benum0_1_.CONCRETE_TYPE as CONCRETE2_0_, benum0_.BE_PREFIX as BE2_8_, benum0_.BE_SUFFIX as BE3_8_, benum0_.TARGET_NAME as TARGET4_8_, benum0_.CENTROID as CENTROID8_, benum0_.DEFAULT_IMAGE_ID as DEFAULT6_8_, benum0_.COUNTRY_CODE_ID as COUNTRY7_8_'
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[benum0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
       \-[FROM_FRAGMENT] FromElement: 'BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=BE_NUM,tableAlias=benum0_,colums={,className=gov.llnl.e3.model.BENum}}

[02-Oct-2006 15:58:49] 429687 [main] DEBUG (ErrorCounter.java:72) - throwQueryException() : no errors
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (QueryTranslatorImpl.java:177) - HQL: from gov.llnl.e3.model.BENum
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (QueryTranslatorImpl.java:178) - SQL: select benum0_.ID as ID, benum0_1_.CONCRETE_TYPE as CONCRETE2_0_, benum0_.BE_PREFIX as BE2_8_, benum0_.BE_SUFFIX as BE3_8_, benum0_.TARGET_NAME as TARGET4_8_, benum0_.CENTROID as CENTROID8_, benum0_.DEFAULT_IMAGE_ID as DEFAULT6_8_, benum0_.COUNTRY_CODE_ID as COUNTRY7_8_ from BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (ErrorCounter.java:72) - throwQueryException() : no errors
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (AbstractFlushingEventListener.java:52) - flushing session
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (AbstractFlushingEventListener.java:102) - processing flush-time cascades
[02-Oct-2006 15:58:49] 429687 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.E3User
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.groups
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.groups
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.views
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.views
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.E3User
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:49] 429703 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
...removed a bunch of duplicate lines
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (AbstractFlushingEventListener.java:150) - dirty checking collections
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (AbstractFlushingEventListener.java:167) - Flushing entities and processing referenced collections
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.E3User.groups#3], was: [gov.llnl.e3.model.E3User.groups#3] (uninitialized)
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.E3User.views#3], was: [gov.llnl.e3.model.E3User.views#3] (uninitialized)
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.Aliases#302], was: [gov.llnl.e3.model.Material.Aliases#302] (uninitialized)
[02-Oct-2006 15:58:50] 430437 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.materialGroups#302], was: [gov.llnl.e3.model.Material.materialGroups#302] (uninitialized)
... remove a bunch of similiar lines
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.Aliases#654], was: [gov.llnl.e3.model.Material.Aliases#654] (uninitialized)
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.materialGroups#654], was: [gov.llnl.e3.model.Material.materialGroups#654] (uninitialized)
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (AbstractFlushingEventListener.java:203) - Processing unreferenced collections
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (AbstractFlushingEventListener.java:217) - Scheduling collection removes/(re)creates/updates
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (AbstractFlushingEventListener.java:79) - Flushed: 0 insertions, 0 updates, 0 deletions to 205 objects
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (AbstractFlushingEventListener.java:85) - Flushed: 0 (re)creations, 0 updates, 0 removals to 410 collections
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (Printer.java:83) - listing entities:
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (Printer.java:90) - gov.llnl.e3.model.Material{casId=111-40-0, Aliases=<uninitialized>, standardName=Severina, ksetId=14466, state=Gas, materialGroups=<uninitialized>, spectralLibrary=gov.llnl.e3.model.SpectralLibrary#11606, spcFileURL=file://data/ChemSpectra/PNNL/PNNL_VOL_10_2/Aliased/Severina.SPC, id=11629}
[02-Oct-2006 15:58:50] 430781 [main] DEBUG (Printer.java:90) - gov.llnl.e3.model.Material{casId=300-62-9, Aliases=<uninitialized>, standardName=Edith, ksetId=5910, state=Gas, materialGroups=<uninitialized>, spectralLibrary=gov.llnl.e3.model.SpectralLibrary#262, spcFileURL=file://data/ChemSpectra/PNNL/PNNL_VOL_10/Aliased/Edith.SPC, id=377}
... remove a bunch of similiar lines
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (Printer.java:90) - gov.llnl.e3.model.Material{casId=108-86-1, Aliases=<uninitialized>, standardName=Kreszentia, ksetId=11952, state=Gas, materialGroups=<uninitialized>, spectralLibrary=gov.llnl.e3.model.SpectralLibrary#262, spcFileURL=file://data/ChemSpectra/PNNL/PNNL_VOL_10/Aliased/Kreszentia.SPC, id=582}
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (Printer.java:87) - more......
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (DefaultAutoFlushEventListener.java:60) - Dont need to execute flush
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (AbstractBatcher.java:324) - select benum0_.ID as ID, benum0_1_.CONCRETE_TYPE as CONCRETE2_0_, benum0_.BE_PREFIX as BE2_8_, benum0_.BE_SUFFIX as BE3_8_, benum0_.TARGET_NAME as TARGET4_8_, benum0_.CENTROID as CENTROID8_, benum0_.DEFAULT_IMAGE_ID as DEFAULT6_8_, benum0_.COUNTRY_CODE_ID as COUNTRY7_8_ from BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID
Hibernate: select benum0_.ID as ID, benum0_1_.CONCRETE_TYPE as CONCRETE2_0_, benum0_.BE_PREFIX as BE2_8_, benum0_.BE_SUFFIX as BE3_8_, benum0_.TARGET_NAME as TARGET4_8_, benum0_.CENTROID as CENTROID8_, benum0_.DEFAULT_IMAGE_ID as DEFAULT6_8_, benum0_.COUNTRY_CODE_ID as COUNTRY7_8_ from BE_NUM benum0_ inner join ABSTRACT_E3_ELEMENT benum0_1_ on benum0_.ID=benum0_1_.ID
[02-Oct-2006 15:58:50] 430797 [main] DEBUG (AbstractBatcher.java:378) - preparing statement
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (AbstractBatcher.java:306) - about to open ResultSet (open ResultSets: 0, globally: 0)
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (Loader.java:405) - processing result set
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (Loader.java:410) - result set row: 0
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#50043]
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#50043]
[02-Oct-2006 15:58:50] 430875 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#50043]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:410) - result set row: 1
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#115392]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#115392]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#115392]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:410) - result set row: 2
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#115473]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#115473]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#115473]
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:410) - result set row: 3
[02-Oct-2006 15:58:51] 430906 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#732]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#732]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#732]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:410) - result set row: 4
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#5827]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#5827]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#5827]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:410) - result set row: 5
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#11524]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#11524]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#11524]
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:410) - result set row: 6
[02-Oct-2006 15:58:51] 430922 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#11715]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#11715]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#11715]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:410) - result set row: 7
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#11833]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#11833]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#11833]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:410) - result set row: 8
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:828) - result row: EntityKey[gov.llnl.e3.model.BENum#50290]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:978) - Initializing object from ResultSet: [gov.llnl.e3.model.BENum#50290]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (BasicEntityPersister.java:1651) - Hydrating entity: [gov.llnl.e3.model.BENum#50290]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:429) - done processing result set (9 rows)
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (AbstractBatcher.java:313) - about to close ResultSet (open ResultSets: 1, globally: 1)
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (AbstractBatcher.java:416) - closing statement
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (Loader.java:528) - total objects hydrated: 9
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (TwoPhaseLoad.java:96) - resolving associations for [gov.llnl.e3.model.BENum#50043]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (CollectionLoadContext.java:141) - creating collection wrapper:[gov.llnl.e3.model.BENum.Datasets#50043]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (DefaultLoadEventListener.java:143) - loading entity: [gov.llnl.e3.model.GeoImage#11523]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (DefaultLoadEventListener.java:216) - creating new proxy for entity
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (DefaultLoadEventListener.java:143) - loading entity: [gov.llnl.e3.model.CountryCode#233]
[02-Oct-2006 15:58:51] 431172 [main] DEBUG (DefaultLoadEventListener.java:216) - creating new proxy for entity
[02-Oct-2006 15:58:51] 431187 [main] DEBUG (JDBCTransaction.java:83) - commit
[02-Oct-2006 15:58:51] 431187 [main] DEBUG (SessionImpl.java:323) - automatically flushing session
[02-Oct-2006 15:58:51] 431187 [main] DEBUG (AbstractFlushingEventListener.java:52) - flushing session
[02-Oct-2006 15:58:51] 431187 [main] DEBUG (AbstractFlushingEventListener.java:102) - processing flush-time cascades
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.E3User
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.groups
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.groups
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.views
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.E3User.views
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.E3User
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:51] 431203 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
... remove a bunch of similiar lines
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.Aliases
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: gov.llnl.e3.model.Material.materialGroups
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: gov.llnl.e3.model.Material
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (AbstractFlushingEventListener.java:150) - dirty checking collections
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (AbstractFlushingEventListener.java:167) - Flushing entities and processing referenced collections
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.E3User.groups#3], was: [gov.llnl.e3.model.E3User.groups#3] (uninitialized)
[02-Oct-2006 15:58:51] 431812 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.E3User.views#3], was: [gov.llnl.e3.model.E3User.views#3] (uninitialized)
[02-Oct-2006 15:58:51] 431828 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.Aliases#302], was: [gov.llnl.e3.model.Material.Aliases#302] (uninitialized)
[02-Oct-2006 15:58:51] 431828 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.materialGroups#302], was: [gov.llnl.e3.model.Material.materialGroups#302] (uninitialized)
... remove a bunch of similiar lines
[02-Oct-2006 15:58:52] 432062 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.Aliases#654], was: [gov.llnl.e3.model.Material.Aliases#654] (uninitialized)
[02-Oct-2006 15:58:52] 432062 [main] DEBUG (Collections.java:140) - Collection found: [gov.llnl.e3.model.Material.materialGroups#654], was: [gov.llnl.e3.model.Material.materialGroups#654] (uninitialized)
[02-Oct-2006 15:58:52] 432062 [main] DEBUG (AbstractFlushingEventListener.java:203) - Processing unreferenced collections
[02-Oct-2006 15:58:52] 432062 [main] DEBUG (Collections.java:50) - Collection dereferenced: [gov.llnl.e3.model.BENum.Datasets#50043]
Exception while ending transaction:
org.hibernate.HibernateException: Don't dereference a collection with cascade="all-delete-orphan": gov.llnl.e3.model.BENum.Datasets
   at org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:70)
   at org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:38)
   at org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:211)
   at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:71)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
   at gov.llnl.e3.manager.E3Manager.endTransaction(E3Manager.java:343)
   at gov.llnl.e3.manager.E3Manager.endTransaction(E3Manager.java:314)
   at gov.llnl.e3.manager.E3Manager.getAllBENums(E3Manager.java:443)
   at gov.llnl.e3.util.gui.TargetMapSelectionLayer.init(TargetMapSelectionLayer.java:134)
   at gov.llnl.e3.util.gui.TargetMapPanel.<init>(TargetMapPanel.java:134)
   at gov.llnl.e3.ui.frame.QueryFrame.addBENumConstraint(QueryFrame.java:674)
   at gov.llnl.e3.ui.frame.QueryFrame.addConstraint(QueryFrame.java:586)
   at gov.llnl.e3.ui.frame.QueryFrame.createConstraintPanel(QueryFrame.java:501)
   at gov.llnl.e3.ui.frame.QueryFrame.<init>(QueryFrame.java:370)
   at gov.llnl.e3.ui.CaseManager.<init>(CaseManager.java:496)
   at gov.llnl.e3.ui.CaseManager.main(CaseManager.java:1607)
[02-Oct-2006 15:58:52] 432078 [main] ERROR (E3Manager.java:348) - Exception while ending transaction:
org.hibernate.HibernateException: Don't dereference a collection with cascade="all-delete-orphan": gov.llnl.e3.model.BENum.Datasets
   at org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:70)
   at org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:38)
   at org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:211)
   at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:71)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86)
   at gov.llnl.e3.manager.E3Manager.endTransaction(E3Manager.java:343)
   at gov.llnl.e3.manager.E3Manager.endTransaction(E3Manager.java:314)
   at gov.llnl.e3.manager.E3Manager.getAllBENums(E3Manager.java:443)
   at gov.llnl.e3.util.gui.TargetMapSelectionLayer.init(TargetMapSelectionLayer.java:134)
   at gov.llnl.e3.util.gui.TargetMapPanel.<init>(TargetMapPanel.java:134)
   at gov.llnl.e3.ui.frame.QueryFrame.addBENumConstraint(QueryFrame.java:674)
   at gov.llnl.e3.ui.frame.QueryFrame.addConstraint(QueryFrame.java:586)
   at gov.llnl.e3.ui.frame.QueryFrame.createConstraintPanel(QueryFrame.java:501)
   at gov.llnl.e3.ui.frame.QueryFrame.<init>(QueryFrame.java:370)
   at gov.llnl.e3.ui.CaseManager.<init>(CaseManager.java:496)
   at gov.llnl.e3.ui.CaseManager.main(CaseManager.java:1607)
[02-Oct-2006 15:58:52] 432078 [main] DEBUG (JDBCTransaction.java:132) - rollback
[02-Oct-2006 15:58:52] 432078 [main] DEBUG (JDBCContext.java:278) - before transaction completion
[02-Oct-2006 15:58:52] 432078 [main] DEBUG (SessionImpl.java:372) - before transaction completion
[02-Oct-2006 15:58:52] 432094 [main] DEBUG (JDBCTransaction.java:143) - rolled back JDBC Connection
[02-Oct-2006 15:58:52] 432094 [main] DEBUG (JDBCContext.java:283) - after transaction completion
[02-Oct-2006 15:58:52] 432094 [main] DEBUG (SessionImpl.java:403) - after transaction completion
rolled back transaction id: 26561296
[02-Oct-2006 15:58:52] 432094 [main] WARN  (E3Manager.java:352) - rolled back transaction id: 26561296
[02-Oct-2006 15:58:52] 432094 [main] ERROR (TargetMapSelectionLayer.java:153) - Problem initializing from DB.gov.llnl.e3.exception.E3DatabaseAccessException: Error while attempting to end transaction with Hibernate.
[02-Oct-2006 15:58:52] 432281 [main] INFO  (TimingLogger.java:68) - Timing Logger started...
[02-Oct-2006 15:58:52] 432281 [main] DEBUG (JDBCTransaction.java:46) - begin
[02-Oct-2006 15:58:52] 432281 [main] DEBUG (JDBCTransaction.java:50) - current autocommit status: false


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.