[OpenVPMS Developers] [JIRA] (OBF-219) java.lang.IllegalArgumentException: Invalid argument 'archetypeId'
------------------------------------------------------------------
Key: OBF-219 URL: https://openvpms.atlassian.net/browse/OBF-219 Project: Business Framework Issue Type: Bug Components: persistence Affects Versions: 1.6, 1.5 Reporter: Tim Anderson Assignee: Tim Anderson Fix For: 1.7
Originally From http://www.openvpms.org/forum/kettle-gets-failed-process-invalid-argument-archetypeid-errors
{noformat} Caused by: java.lang.IllegalArgumentException: Invalid argument 'archetypeId' at org.openvpms.component.business.domain.im.common.IMObjectReference.(IMObjectReference.java:111) at org.openvpms.component.business.dao.hibernate.im.common.IMObjectDOImpl.getObjectReference(IMObjectDOImpl.java:180) at org.openvpms.component.business.dao.hibernate.im.common.IMObjectDOImpl.equals(IMObjectDOImpl.java:329) at java.util.HashMap.put(Unknown Source) at org.openvpms.component.business.dao.hibernate.im.common.Context.add(Context.java:262) at org.openvpms.component.business.dao.hibernate.im.common.IMObjectAssembler.assemble(IMObjectAssembler.java:109) at org.openvpms.component.business.dao.hibernate.im.common.CompoundAssembler.assemble(CompoundAssembler.java:90) at org.openvpms.component.business.dao.hibernate.im.common.AbstractAssembler.getDO(AbstractAssembler.java:50) at org.openvpms.component.business.dao.hibernate.im.common.SetAssembler.assembleDO(SetAssembler.java:114) at org.openvpms.component.business.dao.hibernate.im.act.AbstractActAssembler.assembleDO(AbstractActAssembler.java:91) at org.openvpms.component.business.dao.hibernate.im.act.AbstractActAssembler.assembleDO(AbstractActAssembler.java:39) at org.openvpms.component.business.dao.hibernate.im.common.IMObjectAssembler.assemble(IMObjectAssembler.java:113) at org.openvpms.component.business.dao.hibernate.im.common.CompoundAssembler.assemble(CompoundAssembler.java:90) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:879) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:897) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.access$100(IMObjectDAOHibernate.java:98) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$2.doInHibernate(IMObjectDAOHibernate.java:186) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$9$1.doInHibernate(IMObjectDAOHibernate.java:1086) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$9.doInTransaction(IMObjectDAOHibernate.java:1082) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.update(IMObjectDAOHibernate.java:1080) at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:183) ... 9 more {noformat}
This exception is occurring during assembly of unsaved IMObjectDOImpl instances, and is occurring when the IMObjectDOImpl.equals() method is invoked by the HashMap when hash collision occurs. The IMObjectDOImpl hasn't been populated at this stage, so the equals() method fails. This error is most likely to be seen when large numbers of new objects are being saved in a single transaction. For small numbers of new objects, hash collision is less likely to occur. The fix is to pre-populate the archetypeId and linkId on the new object, in order for equality to succeed.
-- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://openvpms.atlassian.net/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf