Hi, I would appreciate any help with this problem. It seems whenever I delete one of the records in the association I get a mapping problem to the DB. I am fine if I just add records to the existing association (one-to-many) but any removal of existing records causes this NULL value exception when I do the update. The below might be pretty difficult to look through but I am hoping someone else has struggled with this in the past and can give me some direction.
Thanks! Alex.
Hibernate version: 2.1.6
Mapping documents:
<hibernate-mapping>
<class
name="com.t.ccs.adminRouting.model.po.SkillsetAdmin"
table="SkillsetAdmin"
dynamic-update="false"
dynamic-insert="false"
>
<composite-id
name="id"
class="com.t.ccs.adminRouting.model.po.SkillsetAdminKey"
>
<key-property
name="skillsetName"
type="java.lang.String"
column="skillsetName"
length="40"
/>
<key-property
name="configName"
type="java.lang.String"
column="configName"
length="40"
/>
</composite-id>
<property
name="skillsetType"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="skillsetType"
length="20"
not-null="true"
/>
<set
name="skillsetSiteAssociations"
lazy="false"
inverse="false"
cascade="all"
sort="unsorted"
>
<key>
<column name="skillsetName" not-null="true"/>
<column name="configName" not-null="true"/>
</key>
<one-to-many class="com.t.ccs.adminRouting.model.po.SkillsetSiteAssocia
tionAdmin"/>
</set>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="com.t.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin"
table="SkillsetSiteAssociationAdmin"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="id"
type="java.lang.Integer"
>
<generator class="increment">
</generator>
</id>
<property
name="skillsetName"
type="java.lang.String"
update="false"
insert="true"
access="property"
column="skillsetName"
length="40"
not-null="true"
/>
<property
name="siteName"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="siteName"
length="30"
not-null="true"
/>
<property
name="percentage"
type="java.lang.Integer"
update="true"
insert="true"
access="property"
column="percentage"
not-null="true"
/>
<property
name="phoneNumber"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="phoneNumber"
length="11"
not-null="true"
/>
<property
name="configName"
type="java.lang.String"
update="false"
insert="true"
access="property"
column="configName"
not-null="true"
/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Code:
/**
* Retrieve the current SkillsetAdmin object for the skillset
* and update it with the new site information
*/
try {
Session session = SessionFactoryUtil.currentSession();
Transaction trans = null;
try {
trans = session.beginTransaction();
Query query = session.createQuery(
"from " + SkillsetAdmin.class.getName() +
" as cts " + " where cts.id.skillsetName = :skillsetName
" +
" and cts.id.configName = :configName");
query.setParameter("skillsetName", skillset.getSkillsetName(
));
query.setParameter("configName", selectedconfiguration);
skillsetAdminList = query.list();
logger.debug("Retrieved skillsetAdminList = " +
skillsetAdminList.get(0) + "\n Size = " + skil
lsetAdminList.size());
/* Assign the one object we should have retrieved from the r
equest
* for one skillset
*/
skillsetAdminRetrieved = (SkillsetAdmin) skillsetAdminList.g
et(0);
/* Get current skillsetSiteAssociation records */
/* oldAssociations = new HashSet(); REMOVE */
oldAssociations = skillsetAdminRetrieved.getSkillsetSiteAsso
ciations();
int oldSiteSize = oldAssociations.size();
logger.debug("oldAssociations.size() = " + oldSiteSize);
/* Iterate over set of old site records and log info */
Iterator iter = oldAssociations.iterator();
oldSite = new SkillsetSiteAssociationAdmin();
while(iter.hasNext()) {
oldSite = (SkillsetSiteAssociationAdmin) iter.next();
logger.debug("\n\nOld site deleted: \n" +
"\nSkillsetName: " + oldSite.getSkillsetName() +
"\nSiteName: " + oldSite.getSiteName() +
"\nPercentage: " + oldSite.getPercentage() +
"\nPhone Number: " + oldSite.getPhoneNumber());
oldAssociations.remove(oldSite);
session.delete(oldSite);
}
/* For the array list of sites in bean passed in iterate thr
ough
* and build the new Set of sites to replace the one
* retrieved from the query with the old site set.
*/
newAssociations = new HashSet();
/* GET the siteList from skillset object passed in to use
* for constructing the new set of site records.
*/
siteList = skillset.getSiteList();
siteNum = siteList.size();
logger.debug("Number of Site records, SiteNum = " + siteNum)
;
/* Build new site Set for SkillsetAdmin object to be saved *
/
for (i=0; i<siteNum; i++) {
aSite = (Site) siteList.get(i);
logger.debug("Site #" + i + ": " + aSite);
siteAssociation = new SkillsetSiteAssociationAdmin(
skillset.getSkillsetName(),
aSite.getSiteName(),
aSite.getPercentage(),
aSite.getPhoneNo(),
selectedconfiguration);
siteAssociation.setSkillsetName(skillset.getSkillsetName
());
siteAssociation.setSiteName(aSite.getSiteName());
siteAssociation.setPercentage(aSite.getPercentage());
siteAssociation.setPhoneNumber(aSite.getPhoneNo());
siteAssociation.setConfigName(selectedconfiguration);
logger.debug("siteassociation for site " + i + " is: " +
"\nskillsetName = " + siteAssociation.getS
killsetName() +
"\nsiteName = " + siteAssociation.getSiteN
ame() +
"\nPercentage = " + siteAssociation.getPer
centage() +
"\nPhoneNumber = " + siteAssociation.getPh
oneNumber() +
"\nConfig = " + siteAssociation.getConfigN
ame());
/* Add each object to set to place in SkillsetAdmin obje
ct */
oldAssociations.add(siteAssociation);
}
/* Assign new site info to SkillsetAdmin object being update
d */
skillsetAdminRetrieved.setSkillsetSiteAssociations(oldAssoci
ations);
logger.debug("\nskillsetAdminRetrieved update values are: "
+
skillsetAdminRetrieved + "\n id = " +
skillsetAdminRetrieved.getId());
session.update(skillsetAdminRetrieved);
trans.commit();
} catch (HibernateException e) {
if (trans != null) {
trans.rollback();
}
throw new BareboneApplicationException("Failed to update Ski
llset.");
} finally {
SessionFactoryUtil.closeSession();
}
} catch (HibernateException e) {
logger.error("Failed to get session for skillset Update: " +
" selectedconfiguration = " + selectedconfiguration, e);
throw new BareboneApplicationException("Failed to update skillset
.");
}
Full stack trace of any exception that occurs:
##PEM Executing batch size: 1
##PEM SQL Exception
java.sql.BatchUpdateException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8738)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
at net.sf.hibernate.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:605)
at net.sf.hibernate.impl.ScheduledCollectionUpdate.execute(ScheduledCollectionUpdate.java:49)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2374)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.telus.barebone.dao.SkillsetDAO.updateSkillset(SkillsetDAO.java:285)
at com.telus.barebone.managers.SkillsetManager.saveSkillset(SkillsetManager.java:224)
at com.telus.barebone.actions.SkillsetAction.execute(SkillsetAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1111)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:437)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5699)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:690)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3216)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2591)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
##PEM SQL Error: 1407, SQLState: 72000
##PEM ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
##PEM SQL Error: 1407, SQLState: 72000
##PEM ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
##PEM done closing: 0 open PreparedStatements, 0 open ResultSets
##PEM closing statement
##PEM SQL Exception
java.sql.BatchUpdateException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8738)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
at net.sf.hibernate.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:605)
at net.sf.hibernate.impl.ScheduledCollectionUpdate.execute(ScheduledCollectionUpdate.java:49)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2374)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.telus.barebone.dao.SkillsetDAO.updateSkillset(SkillsetDAO.java:285)
at com.telus.barebone.managers.SkillsetManager.saveSkillset(SkillsetManager.java:224)
at com.telus.barebone.actions.SkillsetAction.execute(SkillsetAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1111)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:437)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5699)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:690)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3216)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2591)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
##PEM SQL Error: 1407, SQLState: 72000
##PEM ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
##PEM SQL Error: 1407, SQLState: 72000
##PEM ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
##PEM Could not execute JDBC batch update
java.sql.BatchUpdateException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8738)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
at net.sf.hibernate.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:605)
at net.sf.hibernate.impl.ScheduledCollectionUpdate.execute(ScheduledCollectionUpdate.java:49)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2374)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.telus.barebone.dao.SkillsetDAO.updateSkillset(SkillsetDAO.java:285)
at com.telus.barebone.managers.SkillsetManager.saveSkillset(SkillsetManager.java:224)
at com.telus.barebone.actions.SkillsetAction.execute(SkillsetAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1111)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:437)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5699)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:690)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3216)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2591)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
##PEM Could not synchronize database state with session
net.sf.hibernate.JDBCException: Could not execute JDBC batch update
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:133)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
at net.sf.hibernate.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:605)
at net.sf.hibernate.impl.ScheduledCollectionUpdate.execute(ScheduledCollectionUpdate.java:49)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2374)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.telus.barebone.dao.SkillsetDAO.updateSkillset(SkillsetDAO.java:285)
at com.telus.barebone.managers.SkillsetManager.saveSkillset(SkillsetManager.java:224)
at com.telus.barebone.actions.SkillsetAction.execute(SkillsetAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1111)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:437)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5699)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:690)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3216)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2591)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
Caused by:
java.sql.BatchUpdateException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8738)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
... 27 more
Caused by:
java.sql.SQLException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:622)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:542)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8673)
... 29 more
##PEM rollback
##PEM transaction completion
##PEM closing session
##PEM disconnecting session
##PEM returning connection to pool, pool size: 1
##PEM transaction completion
com.telus.barebone.exceptions.BareboneApplicationException
at com.telus.barebone.dao.SkillsetDAO.updateSkillset(SkillsetDAO.java:291)
at com.telus.barebone.managers.SkillsetManager.saveSkillset(SkillsetManager.java:224)
at com.telus.barebone.actions.SkillsetAction.execute(SkillsetAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1111)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:437)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:319)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5699)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:690)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3216)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2591)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
Retriving the SkillsetList form Cache..
##PEM running Session.finalize()
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
Shown Below.
Debug level Hibernate log excerpt:
Inside Skillset Action-formAction.EDIT_SKILLSET_SUCCESS
i = 0 site: Calgary
100
9995202630
percentageTotal : 100.0 percentage : 100.0
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 Entering SkillsetDAO.updateSkillset: Starting skillset update.
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 SkillsetDAO.updateSkillset input parameter values:
SkillsetName: cred_restoral
selectedconfiguration = test_config2
##PEM opened session
##PEM begin
##PEM total checked-out connections: 0
##PEM using pooled JDBC connection, pool size: 0
##PEM current autocommit status:false
##PEM find: from com.telus.ccs.adminRouting.model.po.SkillsetAdmin as cts where cts.id.skillsetName = :skillsetName and cts.id.configName = :configName
##PEM named parameters: {skillsetName=cred_restoral, configName=test_config2}
##PEM compiling query
##PEM flushing session
##PEM Flushing entities and processing referenced collections
##PEM Processing unreferenced collections
##PEM Scheduling collection removes/(re)creates/updates
##PEM Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
##PEM Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
##PEM Dont need to execute flush
##PEM HQL: from com.telus.ccs.adminRouting.model.po.SkillsetAdmin as cts where cts.id.skillsetName = :skillsetName and cts.id.configName = :configName
##PEM SQL: select skillsetad0_.skillsetName as skillset1_, skillsetad0_.configName as configName, skillsetad0_.skillsetType as skillset3_ from SkillsetAdmin skillsetad0_ where (skillsetad0_.skillsetName=? )and(skillsetad0_.configName=? )
##PEM about to open: 0 open PreparedStatements, 0 open ResultSets
##PEM select skillsetad0_.skillsetName as skillset1_, skillsetad0_.configName as configName, skillsetad0_.skillsetType as skillset3_ from SkillsetAdmin skillsetad0_ where (skillsetad0_.skillsetName=? )and(skillsetad0_.configName=? )
Hibernate: select skillsetad0_.skillsetName as skillset1_, skillsetad0_.configName as configName, skillsetad0_.skillsetType as skillset3_ from SkillsetAdmin skillsetad0_ where (skillsetad0_.skillsetName=? )and(skillsetad0_.configName=? )
##PEM preparing statement
##PEM binding 'cred_restoral' to parameter: 1
##PEM binding 'test_config2' to parameter: 2
##PEM processing result set
##PEM returning 'cred_restoral' as column: skillset1_
##PEM returning 'test_config2' as column: configName
##PEM result row: com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]
##PEM Initializing object from ResultSet: com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]
##PEM Hydrating entity: com.telus.ccs.adminRouting.model.po.SkillsetAdmin#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]
##PEM returning 'agent' as column: skillset3_
##PEM done processing result set (1 rows)
##PEM done closing: 0 open PreparedStatements, 0 open ResultSets
##PEM closing statement
##PEM total objects hydrated: 1
##PEM resolving associations for [com.telus.ccs.adminRouting.model.po.SkillsetAdmin#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM creating collection wrapper:[com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM done materializing entity [com.telus.ccs.adminRouting.model.po.SkillsetAdmin#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM initializing non-lazy collections
##PEM initializing collection [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM checking second-level cache
##PEM collection not cached
##PEM about to open: 0 open PreparedStatements, 0 open ResultSets
##PEM select skillsetsi0_.skillsetName as skillset2___, skillsetsi0_.configName as configName__, skillsetsi0_.id as id__, skillsetsi0_.id as id0_, skillsetsi0_.skillsetName as skillset2_0_, skillsetsi0_.siteName as siteName0_, skillsetsi0_.percentage as percentage0_, skillsetsi0_.phoneNumber as phoneNum5_0_, skillsetsi0_.configName as configName0_ from SkillsetSiteAssociationAdmin skillsetsi0_ where skillsetsi0_.skillsetName=? and skillsetsi0_.configName=?
Hibernate: select skillsetsi0_.skillsetName as skillset2___, skillsetsi0_.configName as configName__, skillsetsi0_.id as id__, skillsetsi0_.id as id0_, skillsetsi0_.skillsetName as skillset2_0_, skillsetsi0_.siteName as siteName0_, skillsetsi0_.percentage as percentage0_, skillsetsi0_.phoneNumber as phoneNum5_0_, skillsetsi0_.configName as configName0_ from SkillsetSiteAssociationAdmin skillsetsi0_ where skillsetsi0_.skillsetName=? and skillsetsi0_.configName=?
##PEM preparing statement
##PEM binding 'cred_restoral' to parameter: 1
##PEM binding 'test_config2' to parameter: 2
##PEM result set contains (possibly empty) collection: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM uninitialized collection: initializing
##PEM processing result set
##PEM returning '156' as column: id0_
##PEM result row: 156
##PEM Initializing object from ResultSet: 156
##PEM Hydrating entity: com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156
##PEM returning 'cred_restoral' as column: skillset2_0_
##PEM returning 'New West' as column: siteName0_
##PEM returning '100' as column: percentage0_
##PEM returning '6045202630' as column: phoneNum5_0_
##PEM returning 'test_config2' as column: configName0_
##PEM returning 'cred_restoral' as column: skillset2___
##PEM returning 'test_config2' as column: configName__
##PEM found row of collection: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@6b2fec[skillsetName=cred_restoral,configName=test_config2]]
##PEM reading row
##PEM returning '156' as column: id__
##PEM loading [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM attempting to resolve [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM resolved object in session cache [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM done processing result set (1 rows)
##PEM done closing: 0 open PreparedStatements, 0 open ResultSets
##PEM closing statement
##PEM total objects hydrated: 1
##PEM resolving associations for [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM done materializing entity [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM 1 collections were found in result set
##PEM collection fully initialized: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM 1 collections initialized
##PEM collection initialized
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 Retrieved skillsetAdminList = com.telus.ccs.adminRouting.model.po.SkillsetAdmin@71eb1d[id=com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2],skillsetType =agent,skillsetSiteAssociations=[com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin@6383f0]]
Size = 1
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 oldAssociations.size() = 1
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1
Old site deleted:
SkillsetName: cred_restoral
SiteName: New West
Percentage: 100
Phone Number: 6045202630
##PEM deleting a persistent instance
##PEM deleting [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#156]
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 Number of Site records, SiteNum = 1
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 Site #0: Calgary
100
9995202630
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1 siteassociation for site 0 is:
skillsetName = cred_restoral
siteName = Calgary
Percentage = 100
PhoneNumber = 9995202630
Config = test_config2
##PEM 2005.12.20-02:40:15 ivrapp02.ent.agt.ab.ca UNTITLED DEBUG com.telus.barebone.dao.SkillsetDAO -1
skillsetAdminRetrieved update values are: com.telus.ccs.adminRouting.model.po.SkillsetAdmin@71eb1d[id=com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2] ,skillsetType=agent,skillsetSiteAssociations=[com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin@5c6dba]]
id = com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]
##PEM object already associated with session
##PEM commit
##PEM flushing session
##PEM processing cascades for: com.telus.ccs.adminRouting.model.po.SkillsetAdmin
##PEM cascading to collection: com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations
##PEM cascading to saveOrUpdate()
##PEM saveOrUpdate() unsaved instance
##PEM fetching initial value: select max(id) from SkillsetSiteAssociationAdmin
##PEM first free id: 289
##PEM generated identifier: 289
##PEM saving [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#289]
##PEM done processing cascades for: com.telus.ccs.adminRouting.model.po.SkillsetAdmin
##PEM Collection dirty: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM Flushing entities and processing referenced collections
##PEM Collection found: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]], was: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM Processing unreferenced collections
##PEM Scheduling collection removes/(re)creates/updates
##PEM Flushed: 1 insertions, 0 updates, 1 deletions to 3 objects
##PEM Flushed: 0 (re)creations, 1 updates, 0 removals to 1 collections
##PEM listing entities:
##PEM com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin{percentage=100, phoneNumber=6045202630, skillsetName=cred_restoral, configName=test_config2, siteName=New West, id=156}
##PEM com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin{percentage=100, phoneNumber=9995202630, skillsetName=cred_restoral, configName=test_config2, siteName=Calgary, id=289}
##PEM com.telus.ccs.adminRouting.model.po.SkillsetAdmin{skillsetSiteAssociations=[SkillsetSiteAssociationAdmin#289], skillsetType=agent, id=SkillsetAdminKey{skillsetName=cred_restoral, configName=test_config2}}
##PEM executing flush
##PEM Inserting entity: [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#289]
##PEM about to open: 0 open PreparedStatements, 0 open ResultSets
##PEM insert into SkillsetSiteAssociationAdmin (skillsetName, siteName, percentage, phoneNumber, configName, id) values (?, ?, ?, ?, ?, ?)
Hibernate: insert into SkillsetSiteAssociationAdmin (skillsetName, siteName, percentage, phoneNumber, configName, id) values (?, ?, ?, ?, ?, ?)
##PEM preparing statement
##PEM Dehydrating entity: [com.telus.ccs.adminRouting.model.po.SkillsetSiteAssociationAdmin#289]
##PEM binding 'cred_restoral' to parameter: 1
##PEM binding 'Calgary' to parameter: 2
##PEM binding '100' to parameter: 3
##PEM binding '9995202630' to parameter: 4
##PEM binding 'test_config2' to parameter: 5
##PEM binding '289' to parameter: 6
##PEM Adding to batch
##PEM Executing batch size: 1
##PEM success of batch update unknown: 0
##PEM done closing: 0 open PreparedStatements, 0 open ResultSets
##PEM closing statement
##PEM Deleting rows of collection: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM about to open: 0 open PreparedStatements, 0 open ResultSets
##PEM update SkillsetSiteAssociationAdmin set skillsetName=null, configName=null where skillsetName=? and configName=? and id=?
Hibernate: update SkillsetSiteAssociationAdmin set skillsetName=null, configName=null where skillsetName=? and configName=? and id=?
##PEM preparing statement
##PEM binding 'cred_restoral' to parameter: 1
##PEM binding 'test_config2' to parameter: 2
##PEM binding '156' to parameter: 3
##PEM Adding to batch
##PEM done deleting collection rows: 1 deleted
##PEM Updating rows of collection: com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]
##PEM done updating rows: 0 updated
##PEM Inserting rows of collection: [com.telus.ccs.adminRouting.model.po.SkillsetAdmin.skillsetSiteAssociations#com.telus.ccs.adminRouting.model.po.SkillsetAdminKey@739da1[skillsetName=cred_restoral,configName=test_config2]]
##PEM Executing batch size: 1
##PEM SQL Exception
java.sql.BatchUpdateException: ORA-01407: cannot update ("SIVRADMIN"."SKILLSETSITEASSOCIATIONADMIN"."SKILLSETNAME") to NULL