[OpenVPMS Developers] 1.6b3 genbalance error

genbalance got error: java.lang.IllegalArgumentException: Invalid argument 'archetypeId' processing one OTC account containing a large number of transactions.  All other customers and the other 2 OTC accounts processed without errors.

Funnies: a) I am running genbalance after loading the payments ,and debit & credit adjustments but NOT the charges - hence the account balances are all negative and the failing OTC balance is around -$3,600,000 [these are Hong Kong dollars]

b) the kettle loader step is loading the data into the OTC accounts as though they were normal customer accounts [I inserted 3 records in etl_log that map the entity id's for the the OTC accounts to customers 101,102 & 103 and adjusted the RxWorks customer number/clinic number from 1/1, 1/2 & 1/3 to 101, 102 & 103]

The extract from the genbalance log is given below.

If required I could provide the database prior (or after) running genbalance (the self-contained dump is around 370MB) or anything else required.

Regards, Tim

>  > >18:20:05,772  INFO Generating account balance for Edwards, Lucinda, >ID=14282 >18:20:05,788  INFO  Processed 3 of 3 acts >18:20:05,788  INFO  Updated account balance from 0 to -4785.00 >18:20:05,788  INFO Generating account balance for Edwards, Rebecca, >ID=14132 >18:20:05,803  INFO  Processed 1 of 1 acts >18:20:05,803  INFO  Updated account balance from 0 to -1250.00 >18:20:05,803  INFO Generating account balance for EIAH Counter Sales, >ID=161 >18:51:53,885 ERROR Failed to generate account balance for EIAH Counter Sales >org.openvpms.component.business.service.archetype.ArchetypeServiceException: >Failed to save a collection of 33,573 objects. > at >org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:545) > at >org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:513) > at >org.openvpms.archetype.rules.finance.account.CustomerBalanceGenerator.save(CustomerBalanceGenerator.java:265) > at >org.openvpms.archetype.rules.finance.account.CustomerBalanceGenerator.generate(CustomerBalanceGenerator.java:147) > at >org.openvpms.archetype.tools.account.AccountBalanceTool.generate(AccountBalanceTool.java:153) > at >org.openvpms.archetype.tools.account.AccountBalanceTool.generate(AccountBalanceTool.java:288) > at >org.openvpms.archetype.tools.account.AccountBalanceTool.generate(AccountBalanceTool.java:128) > at >org.openvpms.archetype.tools.account.AccountBalanceTool.main(AccountBalanceTool.java:261) >Caused by: >org.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed >to save a collection of objects > at >org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:191) > at >org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:542) > ... 7 more >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:142) > at >org.openvpms.component.business.dao.hibernate.im.act.AbstractActAssembler.assembleDO(AbstractActAssembler.java:91) > at >org.openvpms.component.business.dao.hibernate.im.act.FinancialActAssembler.assembleDO(FinancialActAssembler.java:56) > at >org.openvpms.component.business.dao.hibernate.im.act.FinancialActAssembler.assembleDO(FinancialActAssembler.java:34) > 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) > ... 8 more >18:51:53,905  INFO Generating account balance for Einhauser, Marian, >ID=8528 >18:51:53,922  INFO  Processed 2 of 2 acts >18:51:53,923  INFO  Updated account balance from 0 to -7910.00 >18:51:53,923  INFO Generating account balance for Einheuser, Marion, >ID=12814 >18:51:54,163  INFO  Processed 65 of 65 acts >18:51:54,163  INFO  Updated account balance from 0 to -58331.00 > >  >

_______________________________________________ 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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: [OpenVPMS Developers] 1.6b3 genbalance error - addendum

As an addendum/postscript to the above, I encountered the same "Invalid argument 'archetypeId'" error running a kettle transform to load invoice transactions.  The log extract is below.

However, when I turned on more logging to try and see where the problem is occuring (to see if there is anything peculiar in the record being processed when the error occurred), the error did not appear.

I then removed the extra logging and re-ran (after resetting the database to the point before the transactions were loaded). Again - no error !!!

Regards, Tim

2012/11/04 14:22:38 - load txns - Starting entry [Rx Txn Invoice - cur]
2012/11/04 14:22:38 - Rx Txn Invoice - cur - Loading transformation from repository [Rx Txn Invoice - cur] in directory [/]
2012/11/04 14:22:38 - Rx Txn Invoice - cur - Dispatching started for transformation [Rx Txn Invoice - cur]
2012/11/04 14:22:38 - Rx Txn Invoice - cur - This transformation can be replayed with replay date: 2012/11/04 14:22:38
2012/11/04 14:22:39 - SkipClient.0 - Reading lookup values from step [ClientSkip-n1.csv]
2012/11/04 14:22:39 - Tx-credit.0 - Starting...
2012/11/04 14:22:39 - ClientSkip-n1.csv.0 - Header row skipped in file 'C:\Users\Tim\Documents\HKG Operations\OpenVPMS\Kettle\ClientSkip-n1.csv'
2012/11/04 14:22:39 - Tx-invoice.0 - Starting...
2012/11/04 14:22:39 - Tx-counter.0 - Starting...
2012/11/04 14:22:39 - ClientSkip-n1.csv.0 - Finished processing (I=42, O=0, R=0, W=41, U=0, E=0)
2012/11/04 14:22:42 - Rx Transaction.0 - linenr 50000
2012/11/04 14:22:42 - Select values.0 - linenr 50000
2012/11/04 14:22:42 - SkipClient.0 - linenr 50000
2012/11/04 14:22:42 - If no Skip.0 - linenr 50000
2012/11/04 14:22:42 - De-Dupe Txns.0 - Linenr 50000
2012/11/04 14:22:42 - Rx Transaction.0 - Finished reading query, closing connection.
2012/11/04 14:22:42 - Select values.0 - Finished processing (I=0, O=0, R=59668, W=59668, U=0, E=0)
2012/11/04 14:22:42 - SkipClient.0 - Finished processing (I=0, O=0, R=59709, W=59668, U=0, E=0)
2012/11/04 14:22:42 - If no Skip.0 - Finished processing (I=0, O=0, R=59668, W=59668, U=0, E=0)
2012/11/04 14:22:42 - Rx Transaction.0 - Finished processing (I=59668, O=0, R=0, W=59668, U=0, E=0)
2012/11/04 14:23:27 - De-Dupe Txns.0 - Finished processing (I=0, O=0, R=59668, W=59657, U=0, E=0)
2012/11/04 14:23:27 - Process.0 - linenr 50000
2012/11/04 14:24:24 - Process.0 - Finished processing (I=0, O=0, R=59657, W=59657, U=0, E=0)
2012/11/04 14:24:25 - test.csv.0 - linenr 50000
2012/11/04 14:24:25 - Dummy.0 - Linenr 50000
2012/11/04 14:24:27 - Tx-invoice.0 - Failed to process: Invalid argument 'archetypeId'
2012/11/04 14:25:30 - Dummy.0 - Finished processing (I=0, O=0, R=59657, W=119314, U=0, E=0)
2012/11/04 14:25:30 - test.csv.0 - Finished processing (I=0, O=59658, R=59657, W=59657, U=0, E=0)
2012/11/04 14:25:31 - If Credit.0 - linenr 50000
2012/11/04 14:26:29 - If Credit.0 - Finished processing (I=0, O=0, R=59657, W=59657, U=0, E=0)
2012/11/04 14:26:30 - Tx-credit.0 - Processed 251 rows in 231.5 seconds (   1.0 rows/sec), generating 1255 objects (5.4 objects/sec)
2012/11/04 14:26:34 - If Patient.0 - linenr 50000
2012/11/04 14:27:30 - If Patient.0 - Finished processing (I=0, O=0, R=59406, W=59406, U=0, E=0)
2012/11/04 14:27:33 - Tx-counter.0 - Processed 3669 rows in 294.2 seconds (   12.4 rows/sec), generating 14676 objects (49.8 objects/sec)
2012/11/04 14:27:55 - Tx-invoice.0 - Processed 50000 rows...
2012/11/04 14:28:32 - Tx-invoice.0 - Processed 55737 rows in 353.3 seconds (   157.7 rows/sec), generating 278685 objects (788.7 objects/sec)
 

If it is of any use, here are the Tx-invoice OPV loader transform step mappings (oID is set as the "ID Field name" in the header):

 






Field name Map to Exclude null Value Remove default objects
TxnDate <act.customerAccountChargesInvoice>startTime N   N
TxnAmount <act.customerAccountChargesInvoice>amount N   N
oPrinted <act.customerAccountChargesInvoice>printed N   N
oRef <act.customerAccountChargesInvoice>reference N   N
TxnText <act.customerAccountChargesInvoice>notes N   N
oStatus <act.customerAccountChargesInvoice>status N   N
oID <act.customerAccountChargesInvoice>author[0]<participation.author>act Y <act.customerAccountChargesInvoice>$value N
UserID <act.customerAccountChargesInvoice>author[0]<participation.author>entity Y <security.user>$value N
oID <act.customerAccountChargesInvoice>clinician[0]<participation.clinician>act Y <act.customerAccountChargesInvoice>$value N
VetID <act.customerAccountChargesInvoice>clinician[0]<participation.clinician>entity Y <security.user>$value N
oID <act.customerAccountChargesInvoice>customer[0]<participation.customer>act Y <act.customerAccountChargesInvoice>$value N
oCID <act.customerAccountChargesInvoice>customer[0]<participation.customer>entity Y <party.customerperson>$value N
oID <act.customerAccountChargesInvoice>location[0]<participation.location>act Y <act.customerAccountChargesInvoice>$value N
ClinicID <act.customerAccountChargesInvoice>location[0]<participation.location>entity Y <party.organisationLocation>$value N
         
Syndicate content