Error when adding a payment ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when adding a payment ...

Ian Gilbert-2
Hi All,

I am testing a fairly recent build with a payment process and have tried to raise a payment in
compensation for a purchase order which was raised successfuly.

I am getting the error attached with this and am not sure why.  Can anyone shed any light on this?
 It is clearly a foreign key violation but I'm not sure why?  The dataset used is the default demo
data.  I have posted the full error (which is truncated in the image at the bottom of this mail.

Very best wishes

Ian

    *  ERROR: Could not complete the Create a Payment
[file:/home/ofbiz1/apps/ofbiz_ethical/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPayment]
process [problem creating the payment value: Exception while inserting the following entity:
[GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.String)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethodId,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][paymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][statusId,PMNT_NOT_PAID(java.lang.String)]
(while inserting:
[GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.String)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethodId,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][paymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][statusId,PMNT_NOT_PAID(java.lang.String)]
(SQL Exception while executing the following:INSERT INTO public.PAYMENT (PAYMENT_ID,
PAYMENT_TYPE_ID, PAYMENT_METHOD_TYPE_ID, PAYMENT_METHOD_ID, PAYMENT_GATEWAY_RESPONSE_ID,
PAYMENT_PREFERENCE_ID, PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_TO, STATUS_ID, EFFECTIVE_DATE,
PAYMENT_REF_NUM, AMOUNT, CURRENCY_UOM_ID, COMMENTS, FIN_ACCOUNT_TRANS_ID,
OVERRIDE_GL_ACCOUNT_ID, ACTUAL_CURRENCY_AMOUNT, ACTUAL_CURRENCY_UOM_ID, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "payment" violates
foreign key constraint "payment_fpty")))]


www.ethicalshopper.net
Fair trade: the alternative choice for your everyday shopping
0845 456 2429

WHAT DO YOU DRINK AT WORK?
We can supply your organisation with high quality fair trade tea and
coffee.  Discounts are available for regular orders.  Contact us for more
details.
Reply | Threaded
Open this post in threaded view
|

Re: Error when adding a payment ...

David E Jones-2

The last bit of the message is the key: it is violating a the from party foreign key. It looks like you have entered "COMPANY" which is not valid unless you have created one. The demo data value for that is "Company".

Which form did you use for this? Did it have a lookup window?

-David


Ian Gilbert wrote:

> Hi All,
>
> I am testing a fairly recent build with a payment process and have tried to raise a payment in
> compensation for a purchase order which was raised successfuly.
>
> I am getting the error attached with this and am not sure why.  Can anyone shed any light on this?
>  It is clearly a foreign key violation but I'm not sure why?  The dataset used is the default demo
> data.  I have posted the full error (which is truncated in the image at the bottom of this mail.
>
> Very best wishes
>
> Ian
>
>     *  ERROR: Could not complete the Create a Payment
> [file:/home/ofbiz1/apps/ofbiz_ethical/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml#createPayment]
> process [problem creating the payment value: Exception while inserting the following entity:
> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.String)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethodId,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][paymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][statusId,PMNT_NOT_PAID(java.lang.String)]
> (while inserting:
> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.String)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethodId,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][paymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][statusId,PMNT_NOT_PAID(java.lang.String)]
> (SQL Exception while executing the following:INSERT INTO public.PAYMENT (PAYMENT_ID,
> PAYMENT_TYPE_ID, PAYMENT_METHOD_TYPE_ID, PAYMENT_METHOD_ID, PAYMENT_GATEWAY_RESPONSE_ID,
> PAYMENT_PREFERENCE_ID, PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_TO, STATUS_ID, EFFECTIVE_DATE,
> PAYMENT_REF_NUM, AMOUNT, CURRENCY_UOM_ID, COMMENTS, FIN_ACCOUNT_TRANS_ID,
> OVERRIDE_GL_ACCOUNT_ID, ACTUAL_CURRENCY_AMOUNT, ACTUAL_CURRENCY_UOM_ID, LAST_UPDATED_STAMP,
> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "payment" violates
> foreign key constraint "payment_fpty")))]
>
>
> www.ethicalshopper.net
> Fair trade: the alternative choice for your everyday shopping
> 0845 456 2429
>
> WHAT DO YOU DRINK AT WORK?
> We can supply your organisation with high quality fair trade tea and
> coffee.  Discounts are available for regular orders.  Contact us for more
> details.

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error when adding a payment ...

Jacopo Cappellato
I've noticed that sometimes the foreign keys are missing from entity
definition (for example the party* fields of the Agreement entity)... is
this by design?

Jacopo

David E. Jones wrote:
>
> The last bit of the message is the key: it is violating a the from party
> foreign key. It looks like you have entered "COMPANY" which is not valid
> unless you have created one. The demo data value for that is "Company".
>
> Which form did you use for this? Did it have a lookup window?
>
> -David
>

Reply | Threaded
Open this post in threaded view
|

Re: Error when adding a payment ...

Ian Gilbert-2
In reply to this post by David E Jones-2
Thanks for responding David,

I figured shortly afterwards that this was the problem.  I manually put this in rather than using
thelookup form which I think works fine.


On Tue, July 11, 2006 16:33, David E. Jones wrote:
>

> The last bit of the message is the key: it is violating a the from party foreign key. It looks
> like you have entered "COMPANY" which is not valid unless you have created one. The demo data
> value for that is "Company".
>
> Which form did you use for this? Did it have a lookup window?
>
>
> -David
>
>
>
> Ian Gilbert wrote:
>
>> Hi All,
>>
>>
>> I am testing a fairly recent build with a payment process and have tried to raise a payment in
>> compensation for a purchase order which was raised successfuly.
>>
>> I am getting the error attached with this and am not sure why.  Can anyone shed any light on
>> this? It is clearly a foreign key violation but I'm not sure why?  The dataset used is the
>> default demo data.  I have posted the full error (which is truncated in the image at the bottom
>> of this mail.
>>
>> Very best wishes
>>
>>
>> Ian
>>
>>
>> *  ERROR: Could not complete the Create a Payment
>> [file:/home/ofbiz1/apps/ofbiz_ethical/applications/accounting/script/org/ofbiz/accounting/paymen
>> t/PaymentServices.xml#createPayment] process [problem creating the payment value: Exception
>> while inserting the following entity:
>> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-1
>> 1
>> 16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
>> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.Stri
>> ng)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethod
>> Id,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][pa
>> ymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][status
>> Id,PMNT_NOT_PAID(java.lang.String)]
>> (while inserting:
>> [GenericEntity:Payment][amount,73.48(java.lang.Double)][comments,null()][createdStamp,2006-07-11
>>  16:27:20.629(java.sql.Timestamp)][createdTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][effectiveDate,2006-07-11
>> 16:25:38.36(java.sql.Timestamp)][finAccountTransId,null()][lastUpdatedStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][lastUpdatedTxStamp,2006-07-11
>> 16:27:20.629(java.sql.Timestamp)][overrideGlAccountId,null()][partyIdFrom,COMPANY(java.lang.Stri
>> ng)][partyIdTo,DemoSupplier(java.lang.String)][paymentId,10010(java.lang.String)][paymentMethod
>> Id,null()][paymentMethodTypeId,PERSONAL_CHECK(java.lang.String)][paymentPreferenceId,null()][pa
>> ymentRefNum,null()][paymentTypeId,VENDOR_PAYMENT(java.lang.String)][roleTypeIdTo,null()][status
>> Id,PMNT_NOT_PAID(java.lang.String)]
>> (SQL Exception while executing the following:INSERT INTO public.PAYMENT (PAYMENT_ID,
>> PAYMENT_TYPE_ID, PAYMENT_METHOD_TYPE_ID, PAYMENT_METHOD_ID, PAYMENT_GATEWAY_RESPONSE_ID,
>> PAYMENT_PREFERENCE_ID, PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_TO, STATUS_ID, EFFECTIVE_DATE,
>> PAYMENT_REF_NUM, AMOUNT, CURRENCY_UOM_ID, COMMENTS, FIN_ACCOUNT_TRANS_ID,
>> OVERRIDE_GL_ACCOUNT_ID, ACTUAL_CURRENCY_AMOUNT, ACTUAL_CURRENCY_UOM_ID, LAST_UPDATED_STAMP,
>> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
>> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "payment" violates
>> foreign key constraint "payment_fpty")))]
>>
>>
>> www.ethicalshopper.net Fair trade: the alternative choice for your everyday shopping
>> 0845 456 2429
>>
>>
>> WHAT DO YOU DRINK AT WORK?
>> We can supply your organisation with high quality fair trade tea and
>> coffee.  Discounts are available for regular orders.  Contact us for more details.
>


--
Ian Gilbert
www.ethicalshopper.net
Fair trade: the alternative choice for your everyday shopping
0845 456 2429

WHAT DO YOU DRINK AT WORK?
We can supply your organisation with high quality fair trade tea and
coffee.  Discounts are available for regular orders.  Contact us for more
details.

Reply | Threaded
Open this post in threaded view
|

Re: Error when adding a payment ...

snehapatel
In reply to this post by Ian Gilbert-2
If you need to get the most attractive and bold Escort Service in Lucknow, you need to join hands with our agency. We earned recognition for our Escort services and matching Escort profiles as per your preferences. If you are availing of our services, you are likely fulfilling your secret cravings. The quality of our Girls gets multiplied when you give them a love bite. We promise to offer 100% satisfaction there so that you can experience the ultimate pleasure. We have an immense collection of Independent Lucknow Call Girl Service to make you feel loved.