[
https://issues.apache.org/jira/browse/OFBIZ-3482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hans Bakker closed OFBIZ-3482.
------------------------------
Resolution: Fixed
Fix Version/s: SVN trunk
Release Branch 9.04
should be fixed in rev:Committed revision 910460.
thank you for reporting.
> proper default for party.preferredCurrencyUomId
> ------------------------------------------------
>
> Key: OFBIZ-3482
> URL: https://issues.apache.org/jira/browse/OFBIZ-3482
> Project: OFBiz
> Issue Type: Bug
> Components: party
> Affects Versions: SVN trunk
> Environment: SVN retrieved on 02/15/10
> Reporter: Babu Sreekanth
> Priority: Minor
> Fix For: Release Branch 9.04, SVN trunk
>
>
> Currently, it is possible to create a Party without specifying
> preferredCurrencyUomId attribute. This cause FK violation, if try to create
> an invoice (see the exception report below). It looks like the defaults are
> not set correctly, as it uses the string "defaultCurrencyUomId".
> [currencyUomId,defaultCurrencyUomId(java.lang.String)]
> Two solutions.
> 1. set the correct 'default' value from properties file
> 2. Make the preferredCurrencyUomId attribute mandatory during the creation of
> the Party.
> Thanks,
> Babu.
> ---- exception report
> ----------------------------------------------------------
> Failure in create operation for entity [Invoice]:
> org.ofbiz.entity.GenericEntityException: Error while inserting:
> [GenericEntity:Invoice][createdStamp,2010-02-16
> 02:11:43.327(java.sql.Timestamp)][createdTxStamp,2010-02-16
> 02:11:43.137(java.sql.Timestamp)][currencyUomId,defaultCurrencyUomId(java.lang.String)][invoiceDate,2010-02-16
>
> 02:11:43.31(java.sql.Timestamp)][invoiceId,INV1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2010-02-16
> 02:11:43.327(java.sql.Timestamp)][lastUpdatedTxStamp,2010-02-16
> 02:11:43.137(java.sql.Timestamp)][partyId,ABJ(java.lang.String)][partyIdFrom,BBJ(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.INVOICE
> (INVOICE_ID, INVOICE_TYPE_ID, PARTY_ID_FROM, PARTY_ID, ROLE_TYPE_ID,
> STATUS_ID, BILLING_ACCOUNT_ID, CONTACT_MECH_ID, INVOICE_DATE, DUE_DATE,
> PAID_DATE, INVOICE_MESSAGE, REFERENCE_NUMBER, DESCRIPTION, CURRENCY_UOM_ID,
> RECURRENCE_INFO_ID, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?) (INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.)). Rolling back transaction.
> Exception: org.ofbiz.entity.GenericEntityException
> Message: Error while inserting:
> [GenericEntity:Invoice][createdStamp,2010-02-16
> 02:11:43.327(java.sql.Timestamp)][createdTxStamp,2010-02-16
> 02:11:43.137(java.sql.Timestamp)][currencyUomId,defaultCurrencyUomId(java.lang.String)][invoiceDate,2010-02-16
>
> 02:11:43.31(java.sql.Timestamp)][invoiceId,INV1(java.lang.String)][invoiceTypeId,SALES_INVOICE(java.lang.String)][lastUpdatedStamp,2010-02-16
> 02:11:43.327(java.sql.Timestamp)][lastUpdatedTxStamp,2010-02-16
> 02:11:43.137(java.sql.Timestamp)][partyId,ABJ(java.lang.String)][partyIdFrom,BBJ(java.lang.String)][statusId,INVOICE_IN_PROCESS(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO OFBIZ.INVOICE
> (INVOICE_ID, INVOICE_TYPE_ID, PARTY_ID_FROM, PARTY_ID, ROLE_TYPE_ID,
> STATUS_ID, BILLING_ACCOUNT_ID, CONTACT_MECH_ID, INVOICE_DATE, DUE_DATE,
> PAID_DATE, INVOICE_MESSAGE, REFERENCE_NUMBER, DESCRIPTION, CURRENCY_UOM_ID,
> RECURRENCE_INFO_ID, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?) (INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.))
> ---- cause
> ---------------------------------------------------------------------
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: SQL Exception while executing the following:INSERT INTO
> OFBIZ.INVOICE (INVOICE_ID, INVOICE_TYPE_ID, PARTY_ID_FROM, PARTY_ID,
> ROLE_TYPE_ID, STATUS_ID, BILLING_ACCOUNT_ID, CONTACT_MECH_ID, INVOICE_DATE,
> DUE_DATE, PAID_DATE, INVOICE_MESSAGE, REFERENCE_NUMBER, DESCRIPTION,
> CURRENCY_UOM_ID, RECURRENCE_INFO_ID, LAST_UPDATED_STAMP,
> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'INVOICE'
> caused a violation of foreign key constraint 'INVOICE_CUOM' for key
> (defaultCurrencyUomId). The statement has been rolled back.)
> ---- cause
> ---------------------------------------------------------------------
> Exception: java.sql.SQLIntegrityConstraintViolationException
> Message: INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.
> ---- cause
> ---------------------------------------------------------------------
> Exception: org.apache.derby.impl.jdbc.EmbedSQLException
> Message: INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.
> ---- cause
> ---------------------------------------------------------------------
> Exception: org.apache.derby.iapi.error.StandardException
> Message: INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.
> ---- stack trace
> ---------------------------------------------------------------
> ERROR 23503: INSERT on table 'INVOICE' caused a violation of foreign key
> constraint 'INVOICE_CUOM' for key (defaultCurrencyUomId). The statement has
> been rolled back.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.