-->
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.  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Bidirectional mapping - fail to save children
PostPosted: Mon May 01, 2006 9:25 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
Description:
I want to create a new version of the PolicyImpl class in the DB.
So I have code that clone the object.
After cloning the object I have problem to save it:
I tried 2 ways:
1) session.saveOrUpdate(policy);
And I get:

Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#-1]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:556)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:761)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:753)
at org.hibernate.engine.Cascade.deleteOrphans(Cascade.java:351)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:318)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:410)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:299)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:502)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:494)
at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:134)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:385)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:24
2006-05-01 16:04:18,603 INFO [STDOUT] 2)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:502)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:494)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:490)
at com.bmc.idm.cmplmgr.bo.backend.RunManager.createRun(RunManager.java:1819)
at com.bmc.idm.cmplmgr.bo.backend.PolicyManager.launchRun(PolicyManager.java:602)

2) Copy the QueryArgValueImpl collection to another collection,
make the QueryArgValueImpl collection empty,
iterate over the elements and call session.merge for each of them

List<QueryArgValue> queryArgValues = newPolicy.getQueryArgValues();
ArrayList<QueryArgValue> values = new ArrayList<QueryArgValue>(queryArgValues);
queryArgValues.clear();

newPolicy.setQueryArgValues(values);
for (QueryArgValue value : values) {
session.merge(value);
}
newPolicy.setQueryArgValues(values);

And I get:

Caused by: org.hibernate.TransientObjectException: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:216)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
at org.hibernate.type.EntityType.replace(EntityType.java:203)
at org.hibernate.type.AbstractType.replace(AbstractType.java:153)
at org.hibernate.type.TypeFactory.replace(TypeFactory.java:447)
at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:302)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:159)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:103)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:52)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:672)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:656)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:660)




I also tried to play with the inverse attribute and the cascade attribute but still failed.


Hibernate version:
3.13

Mapping documents:
<class name="PolicyImpl" table="POLICY" optimistic-lock="version" lazy="false">

<cache usage="nonstrict-read-write"/>

<!-- Primary key -->
<id name="id"
column="ID"
type="long"
access="property"
unsaved-value="-1">
<generator class="native"/>
</id>

<!-- <version column="VERSION_OBJ" name="versionNum" type="long" access="property"
unsaved-value="negative"/> -->
....

<bag name="queryArgValues"
inverse="true"
lazy="true" cascade="all-delete-orphan,merge">
<cache usage="read-write"/>
<key column="POLICY_ID"/>
<one-to-many
class="com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl"/>
</bag>

....

</class>


<class name="QueryArgValueImpl" table="A_QUERY_ARG_VALUE" lazy="false">

<cache usage="read-write"/>

<!-- Primary key -->
<id name="id"
column="ID"
type="long"
access="property"
unsaved-value="-1">
<generator class="native"/>
</id>

<!-- KEY1 is a unique constraint combined of the value, field and module -->
<property name="value"
type="string"
update="false">
<column name="VALUE" unique-key="KEY1" not-null="true"/>
</property>

<!-- A foreign key to the policy -->
<many-to-one name="policy"
class="com.bmc.idm.cmplmgr.bo.common.PolicyImpl"
update="false" not-null="true">
<column name="POLICY_ID" unique-key="KEY1" not-null="true"/>
</many-to-one>

....

</class>


Code between sessionFactory.openSession() and session.close():
Given in the description

Full stack trace of any exception that occurs:
Given in the description

Name and version of the database you are using:
Oracle9

The generated SQL (show_sql=true):
Nothing generated

Debug level Hibernate log excerpt:
2006-05-01 16:18:01,298 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#216]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryArgValues
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryDefsData
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] detached instance of: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging detached instance
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl#68]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl#68]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl#68]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] already merged
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryDefsData
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.a2.common.PersonImpl#1]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] entity proxy found in session cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.a2.common.PersonImpl#1]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] entity proxy found in session cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] initializing collection [com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] checking second-level cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.cache.ReadWriteCache] Cache lookup: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64
2006-05-01 16:18:01,314 DEBUG [org.hibernate.cache.EhCache] key: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.store.MemoryStore] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runsCache: MemoryStore hit for com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64 now: 1146489481314
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64 Creation Time: 1146489396145 Next To Last Access Time: 1146489434925
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64 mostRecentTime: 1146489434925
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64 Age to Idle: 120000 Age Idled: 46389
2006-05-01 16:18:01,314 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs: Is element with key com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64 expired?: false
2006-05-01 16:18:01,314 DEBUG [org.hibernate.cache.ReadWriteCache] Cache hit: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs#64
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.RunImpl#73]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.RunImpl#73]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.RunImpl#73]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.RunImpl#75]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.RunImpl#75]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.RunImpl#75]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] collection initialized from cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] already merged
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.a2.common.PersonImpl#1]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] entity proxy found in session cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.a2.common.PersonImpl#1]
2006-05-01 16:18:01,314 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] entity proxy found in session cache
2006-05-01 16:18:01,314 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:01,314 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:01,314 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:01,408 INFO [STDOUT] 05/01 16:18:01 WARNING Warning: applications compiled into standalone SWFs using the Trial and Developer editions of Macromedia Flex expire 1 day after creation. This restriction is only in place for the Trial and Developer editions of Macromedia Flex. <swf name = D:\p4client\3rd_party\jboss\jboss-3.2.6\install\jboss-3.2.6\server\idm\deploy\cmpl_mgr.war\mxml\RootDashboard.swf>
2006-05-01 16:18:01,470 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 217
2006-05-01 16:18:01,486 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:01,486 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 217, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.PolicyImpl#217]
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.WrapVisitor] Wrapped collection in role: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.WrapVisitor] Wrapped collection in role: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryArgValues
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.WrapVisitor] Wrapped collection in role: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryDefsData
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.Cascade] cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.runs
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.Cascade] cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryArgValues
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:01,517 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#30]
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#30]
2006-05-01 16:18:01,517 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#30]
2006-05-01 16:18:01,517 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:01,517 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:01,517 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:01,689 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 218
2006-05-01 16:18:01,704 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:01,704 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:01,704 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 218, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#218]
2006-05-01 16:18:01,720 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,720 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:01,720 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#31]
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#31]
2006-05-01 16:18:01,720 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#31]
2006-05-01 16:18:01,720 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:01,720 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:01,720 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:01,798 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 219
2006-05-01 16:18:01,876 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:01,876 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 219, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#219]
2006-05-01 16:18:01,908 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,908 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:01,908 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:01,908 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:01,908 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:01,908 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:01,908 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:02,033 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 220
2006-05-01 16:18:02,048 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:02,048 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 220, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#220]
2006-05-01 16:18:02,079 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,079 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:02,079 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,079 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,079 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:02,079 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:02,079 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:02,204 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 221
2006-05-01 16:18:02,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:02,267 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 221, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#221]
2006-05-01 16:18:02,329 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,329 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:02,329 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:02,329 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#33]
2006-05-01 16:18:02,329 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:02,329 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:02,329 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:02,533 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 222
2006-05-01 16:18:02,579 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:02,579 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 222, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#222]
2006-05-01 16:18:02,626 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,626 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:02,626 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,626 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.arg.AbstarctQueryArgBase#34]
2006-05-01 16:18:02,626 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:02,626 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:02,626 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:02,798 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 223
2006-05-01 16:18:02,829 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:02,829 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 223, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#223]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryArgValues
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.Cascade] cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryDefsData
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.CascadingAction] cascading to merge: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] already merged
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.datasource.AbstractAuditedDataSource#2]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.query.QueryDefBase#35]
2006-05-01 16:18:02,861 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-05-01 16:18:02,861 DEBUG [org.hibernate.SQL] select hibernate_sequence.nextval from dual
2006-05-01 16:18:02,861 DEBUG [org.hibernate.jdbc.AbstractBatcher] preparing statement
2006-05-01 16:18:03,033 DEBUG [org.hibernate.id.SequenceGenerator] Sequence identifier generated: 224
2006-05-01 16:18:03,111 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-05-01 16:18:03,111 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] generated identifier: 224, using strategy: org.hibernate.id.SequenceGenerator
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] saving [com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl#224]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.query.PolicyQueryDefDataImpl
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyImpl.queryDefsData
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyImpl
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done cascade ACTION_MERGE for collection: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_MERGE for: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl
2006-05-01 16:18:03,158 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.module.ModuleBaseImpl#16]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.module.ModuleBaseImpl#16]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.module.ModuleBaseImpl#16]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] initializing collection [com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] checking second-level cache
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.ReadWriteCache] Cache lookup: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.EhCache] key: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.store.MemoryStore] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policiesCache: MemoryStore hit for com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65 now: 1146489483158
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65 Creation Time: 1146489396583 Next To Last Access Time: 1146489434925
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65 mostRecentTime: 1146489434925
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65 Age to Idle: 120000 Age Idled: 48233
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies: Is element with key com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65 expired?: false
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.ReadWriteCache] Cache hit: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.policies#65
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] loading entity: [com.bmc.idm.cmplmgr.bo.common.PolicyImpl#64]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: [com.bmc.idm.cmplmgr.bo.common.PolicyImpl#64]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultLoadEventListener] resolved object in session cache: [com.bmc.idm.cmplmgr.bo.common.PolicyImpl#64]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] collection initialized from cache
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] initializing collection [com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65]
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] checking second-level cache
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.ReadWriteCache] Cache lookup: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.EhCache] key: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.store.MemoryStore] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptionsCache: MemoryStore hit for com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65 now: 1146489483158
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65 Creation Time: 1146489396255 Next To Last Access Time: 1146489432456
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65 mostRecentTime: 1146489432456
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65 Age to Idle: 120000 Age Idled: 50702
2006-05-01 16:18:03,158 DEBUG [net.sf.ehcache.Cache] com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions: Is element with key com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65 expired?: false
2006-05-01 16:18:03,158 DEBUG [org.hibernate.cache.ReadWriteCache] Cache hit: com.bmc.idm.cmplmgr.bo.common.PolicyBaseImpl.allowedExceptions#65
2006-05-01 16:18:03,158 DEBUG [org.hibernate.event.def.DefaultInitializeCollectionEventListener] collection initialized from cache
2006-05-01 16:18:10,642 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] Lock 'TRIGGER_ACCESS' is desired by: SCHEDULER_QuartzSchedulerThread
2006-05-01 16:18:10,642 DEBUG [org.quartz.impl.jdbcjobstore.StdRowLockSemaphore] Lock 'TRIGGER_ACCESS' is being obtained: SCHEDULER_QuartzSchedulerThread
2006-05-01 16:18:16,016 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:16,016 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] transient instance of: com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl
2006-05-01 16:18:16,016 DEBUG [org.hibernate.event.def.DefaultMergeEventListener] merging transient instance
2006-05-01 16:18:16,016 DEBUG [org.hibernate.engine.IdentifierValue] id unsaved-value: -1
2006-05-01 16:18:22,438 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'messageHelper'


Avishay

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 01, 2006 9:46 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
after you clone the object, are you clearing out the id field?

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 01, 2006 9:51 am 
Regular
Regular

Joined: Wed Jul 27, 2005 2:33 am
Posts: 118
Quote:
a different object with the same identifier value was already associated with the session: [com.bmc.idm.cmplmgr.bo.common.QueryArgValueImpl#-1]


As per your mapping, -1 is represents an unsaved instance of QueryArgValueImpl. I dont see the reason why you should see this exception for a new instance of a object.


Top
 Profile  
 
 Post subject: Reply
PostPosted: Mon May 01, 2006 9:52 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
Yes - the value of the id is [-1]

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 01, 2006 10:17 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
on that saveOrUpdate, make sure you're not messing up and using the wrong references and deleting the original object or just trying to save it. I see through the stack trace hibernate is running through the delete classes

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 01, 2006 10:22 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
"on that saveOrUpdate, make sure you're not messing up and using the wrong references and deleting the original object or just trying to save it. I see through the stack trace hibernate is running through the delete classes"

I think the reason Hibernate is tring to delete is the cascade="delete-orphan", since he "understand" that the QueryArgValue is orphan.

Any way, should I diconnect the QueryArgValue collection from the Policy and then reconnect it or it should work with saceOrUpdate() ?

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 01, 2006 1:53 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
what's the code where you're copying the object then saving a new one

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject: Code of object clone
PostPosted: Tue May 02, 2006 4:32 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
private void saveIncrementVersion(final IIdentityContext ctx,
Policy changedPolicy,
String oldPolicyName) throws BackendException {
try {
Person loggedInPerson = PersonHelper.getLoggedInPerson(ctx);
String essLoginProfile = ctx.getLoginProfileName();
Session session = getSession();

if (!loggedInPerson.isPolicyOwner(changedPolicy)) {
throw new BackendException(
ctx.getLocale(), MessageKeys.AdministratorMessages.Errors.USER_MUST_BE_POLICY_OWNER);
}
Policy newPolicy = PolicyManager.fullyIncrementVersion(changedPolicy);
//add new principal for new PolicyViewers
List<PolicyViewer> PolicyViewers = newPolicy.getPolicyViewers();
for (PolicyViewer policyViewer : PolicyViewers) {
Principal principal = policyViewer.getPrincipal();

if (principal instanceof Person) {
Person person = PersonManager.createPerson(
principal.getExternalId(), essLoginProfile);
person.addPolicyViewer(policyViewer);
}

if (principal instanceof Profile) {
Profile profile = ProfileManager.createProfile(
principal.getExternalId(), essLoginProfile);
profile.addPolicyViewer(policyViewer);
}
}

// Mark the updated Policy as auditable and put it on the current thread.
AuditableBo auditableBo = new AuditableBo(newPolicy,
AuditableAction.Update, loggedInPerson.getExternalId());
audit(auditableBo);
//report to ESS about changes in policy owner/admin/viewer
auditToESS(loggedInPerson, changedPolicy, oldPolicyName);

List<QueryArgValue> queryArgValues = newPolicy.getQueryArgValues();
ArrayList<QueryArgValue> values = new ArrayList<QueryArgValue>(queryArgValues);
queryArgValues.clear();
newPolicy.setLatestPolicyName(newPolicy.getName());
newPolicy.setBase((PolicyBase) session.saveOrUpdateCopy(newPolicy.getBase()));
newPolicy.setQueryArgValues(values);
for (QueryArgValue value : values) {
session.saveOrUpdateCopy(value);
}
newPolicy.setQueryArgValues(values);
PolicyManager.launchRun(newPolicy, loggedInPerson.getExternalId());
if(!newPolicy.isInactive())
session.saveOrUpdate(newPolicy);
} catch (HibernateException e) {
BackendExceptionFactory.throwException(_class, ctx,
MessageKeys.PolicyAdminMessages.Errors.FAILED_IN_UPDATE_POLICY,
e);
}

}



Thanks

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 5:20 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
The code above worked in version 2.18
When I moved to 3.13 I had to change this:

for (QueryArgValue value : values) {
session.merge(value); // used to be saveOrUpdateCopy()
}

According ti the migration instructions one should replace saveOrUpdateCop() with merge().
[/b]

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 5:20 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
The code above worked in version 2.18
When I moved to 3.13 I had to change this:

for (QueryArgValue value : values) {
session.merge(value); // used to be saveOrUpdateCopy()
}

According ti the migration instructions one should replace saveOrUpdateCop() with merge().

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 6:03 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
The problem is that you're discarding the persistent objects and continuing to use the transient ones. Anywhere you have "session.merge(x);", replace it with "x = session.merge(x);". Discard all old refereces to x: for example, you can't use the List of transient QueryArgValues after you've merged them, you have to create and use a new List, with the persistent versions of those QueryArgValues.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 3:11 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
Hi
I changed the code as you said:

X x = (X)session.merge(x1);

but I get the exception inside the merge call itself.

Caused by: org.hibernate.TransientObjectException: com.bmc.idm.cmplmgr.bo.common.PolicyImpl at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:216)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
at org.hibernate.type.EntityType.replace(EntityType.java:203)
at org.hibernate.type.AbstractType.replace(AbstractType.java:153)
at org.hibernate.type.TypeFactory.replace(TypeFactory.java:447)
at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:302)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:159)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:103)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:52)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:672)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:656)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:660)

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 5:20 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Can you find out which object is unexpectedly transient? The exception is thrown because a transient object is being found when a persistent one is expected, but I can't untangle the code enough to figure out why a persistent object should be required at that point. It may have something to do with an association: it may be that hibernate requires a cascade="merge" somewhere, in order to get this to work. You probably won't be able to figure out where, until you know what object is causing the exception to be thrown.

So you could put a breakpoint in org.hibernate.engine.ForeignKeys:216, and see what the value of object is. Hibernate is expecting that variable to be persistent.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 10:47 am 
Beginner
Beginner

Joined: Fri Feb 24, 2006 12:52 pm
Posts: 30
This the transiant object:
com.bmc.idm.cmplmgr.bo.common.PolicyImpl


One Policy points to Many QueryArgValue.
QueryArgValue points to One Policy.

_________________
Avishay Balderman


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 6:56 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
The only think left in your original code post that might be causing the problem is this bit:
Code:
    ArrayList<QueryArgValue> values = new ArrayList<QueryArgValue>(queryArgValues);
    newPolicy.setQueryArgValues(values);
    for (QueryArgValue value : values) {
      session.saveOrUpdateCopy(value);
    }
    newPolicy.setQueryArgValues(values);
saveOrUpdateCopy returns the persistent version of value, but you are (or were) discarding them. You need to do somthing like this:
Code:
List<QueryArgValue> values = new ArrayList<QueryArgValues>(queryArgValues.size());
for (QueryArgValue value : queryArgValues)
{
  values.add(session.saveOrUpdateCopy(value);
}
newPolicy.setQueryArgValues(values);
The values that go into newPolicy have to be the persistent ones, not the transient ones.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next

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.