Login  Register

Re: Users - Prices import

Posted by michal-2 on Dec 14, 2005; 3:16pm
URL: http://ofbiz.116.s1.nabble.com/Users-Prices-import-tp136733p136735.html

It was very helpful and you were 100% right. I'm fairly new to ofbiz so
these errors sometimes don't give to many clues.
Also, I have one more question about import of parties. Why when I go to
web tools/Entity Data Maintenance and I cannot click on
PartyAndPostalAddress to view the data. I just want to import company
names and address. Even when I try to export PartyAndPostalAddress I get
this msg
[1] [vvv] PartyAndPostalAddress skipping view entity. What is that about ?
Thanks for your help
Mike

> On Wednesday 14 December 2005 19:09, [hidden email] wrote:
>> Hello,
>> I'm trying to import prices to ofbiz. I have the xml file ready with
>> following fields:
>> productId,productPriceTypeId,currencyUomId,productStoreGroupId,fromDate
>> but when I tried to import xml file I got this error:
>> What am I doing wrong or what am I missing here ?
>
> Have a closer look at the data below, at the end it says:
>
> (ERROR: insert or update on table "product_price" violates foreign key
> constraint "prod_price_prod")))
>
> The constraint is a foreign key you can find the the webtools section
> under
> Entity Reference, go there and with your browser do a search on
> 'prod_price_prod'. There you can see that is the productId in the price
> table.
>
> It is saying you are loading a price with a productId which does not exist
> in
> the Product table... so first load the record in the Product table and
> afterwards in the ProductPrice table
>
> hope this helps....
>
> --
> Regards,
> Hans Bakker
> ANT Websystems Co.,Ltd (http://www.antwebsystems.com)
>
> If you want to verify that this message really originates from
> from the above person, download the public key from:
> http://www.antwebsystems.com/hbakkerAntwebsystems.asc
>>
>> ERROR: org.ofbiz.entity.GenericEntityException: Exception while
>> inserting
>> the following entity:
>> [GenericEntity:ProductPrice][createdStamp,2005-12-14
>> 07:48:14.577(java.sql.Timestamp)][createdTxStamp,2005-12-14
>> 07:47:19.826(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][from
>>Date,2003-03-04
>> 18:48:49.113(java.sql.Timestamp)][lastUpdatedStamp,2005-12-14
>> 07:48:14.577(java.sql.Timestamp)][lastUpdatedTxStamp,2005-12-14
>> 07:47:19.826(java.sql.Timestamp)][price,55.0(java.lang.Double)][productId,0
>>7829(java.lang.String)][productPriceTypeId,AVERAGE_COST(java.lang.String)][p
>>roductStoreGroupId,_NA_(java.lang.String)] (while inserting:
>> [GenericEntity:ProductPrice][createdStamp,2005-12-14
>> 07:48:14.577(java.sql.Timestamp)][createdTxStamp,2005-12-14
>> 07:47:19.826(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][from
>>Date,2003-03-04
>> 18:48:49.113(java.sql.Timestamp)][lastUpdatedStamp,2005-12-14
>> 07:48:14.577(java.sql.Timestamp)][lastUpdatedTxStamp,2005-12-14
>> 07:47:19.826(java.sql.Timestamp)][price,55.0(java.lang.Double)][productId,0
>>7829(java.lang.String)][productPriceTypeId,AVERAGE_COST(java.lang.String)][p
>>roductStoreGroupId,_NA_(java.lang.String)] (SQL Exception while executing
>> the following:INSERT INTO
>> public.PRODUCT_PRICE (PRODUCT_ID, PRODUCT_PRICE_TYPE_ID,
>> CURRENCY_UOM_ID,
>> PRODUCT_STORE_GROUP_ID, FROM_DATE, THRU_DATE, PRICE, CREATED_DATE,
>> CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_LOGIN,
>> LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
>> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
>> (ERROR: insert or update on table "product_price" violates foreign key
>> constraint "prod_price_prod")))
>> Got -1 entities to write to the datasource.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
> --
> Regards,
> Hans Bakker
> ANT Websystems Co.,Ltd (http://www.antwebsystems.com)
>
> If you want to verify that this message really originates from
> from the above person, download the public key from:
> http://www.antwebsystems.com/hbakkerAntwebsystems.asc
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users