Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008246Openbravo ERPA. Platformpublic2009-03-24 10:292009-05-11 07:59
iperdomo 
AinhoaPagola 
urgentcriticalalways
closedfixed 
202.6.25-gentoo-r9
2.40 
2.40MP4 
Core
No
0008246: Initial Client Setup fails - ERROR: null value in column "c_currency_id" violates not-null constraint
I tried to execute the Initial Client setup without success.

This is the errors in the log file

10:18:28 [http-8880-Processor20] ERROR org.openbravo.erpCommon.ad_forms.InitialClientSetupData - SQL error in query: INSERT INTO AD_Client(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Value,Name,Description) VALUES (TO_NUMBER(?),0,'Y',now(),0,now(),0,?, ?, ?)Exception:org.postgresql.util.PSQLException: ERROR: null value in column "c_currency_id" violates not-null constraint
10:18:28 [http-8880-Processor20] WARN org.openbravo.erpCommon.ad_forms.InitialClientSetup - java.sql.SQLException: Connection is closed.
10:18:28 [http-8880-Processor20] ERROR org.openbravo.erpCommon.ad_forms.InitialClientSetupData - SQL error in query: INSERT INTO C_Calendar(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_Calendar_ID,Name) VALUES ( TO_NUMBER(?),0,'Y',now(),0,now(),0,TO_NUMBER(?),?)Exception:org.postgresql.util.PSQLException: ERROR: insert or update on table "c_calendar" violates foreign key constraint "c_calendarclient"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
10:18:28 [http-8880-Processor20] WARN org.openbravo.erpCommon.ad_forms.InitialClientSetup - javax.servlet.ServletException: @CODE=0@ERROR: insert or update on table "c_calendar" violates foreign key constraint "c_calendarclient"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
10:18:28 [http-8880-Processor20] ERROR org.openbravo.erpCommon.ad_forms.InitialClientSetupData - SQL error in query: INSERT INTO GL_Category (GL_Category_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name ,CategoryType,IsDefault) VALUES (TO_NUMBER(?),TO_NUMBER(?),0,'Y',now(),0,now(),0,?,?,?)Exception:org.postgresql.util.PSQLException: ERROR: insert or update on table "gl_category" violates foreign key constraint "adclient_glcategory"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
10:18:28 [http-8880-Processor20] WARN org.openbravo.erpCommon.ad_forms.InitialClientSetup - javax.servlet.ServletException: @CODE=@@CODE=0@ERROR: insert or update on table "gl_category" violates foreign key constraint "adclient_glcategory"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
10:18:28 [http-8880-Processor20] ERROR org.openbravo.erpCommon.ad_forms.InitialClientSetupData - SQL error in query: INSERT INTO C_Channel (C_Channel_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy) VALUES (TO_NUMBER(?),?,TO_NUMBER(?),0,'Y',now(),0,now(),0)Exception:org.postgresql.util.PSQLException: ERROR: insert or update on table "c_channel" violates foreign key constraint "adclient_cchannel"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
10:18:28 [http-8880-Processor20] WARN org.openbravo.erpCommon.ad_forms.InitialClientSetup - javax.servlet.ServletException: @CODE=@@CODE=0@ERROR: insert or update on table "c_channel" violates foreign key constraint "adclient_cchannel"
  Detail: Key (ad_client_id)=(1000002) is not present in table "ad_client".
* Go to: General Setup > Client > Initial Client Setup
* Download the US Accounting file [1]
* Fill all the required fields:
  - Client: MyClient
  - Organization: MyOrg
  - Client Username: MyClientUsername
  - Organization Username: MyOrgUsername
  - Country: United States
  - State: FL
  - City: Miami
  - Currency: US Dollars
  - Accounting Dimensions: Business Partner, Project, Product
* Select the downloaded accounting file
* Click OK



[1] http://downloads.sourceforge.net/openbravo/AccountsSimplifiedUS06v5.csv [^]
No tags attached.
related to backport 0007957 closed rafaroda Multi currency issues in some processes and tables 
blocks defect 0008244 closed rafaroda Initial Client Setup fails - ERROR: null value in column "c_currency_id" violates not-null constraint 
Issue History
2009-03-24 10:52iperdomoTypedefect => backport
2009-03-24 10:52iperdomofix_in_branch => 2.40
2009-03-24 11:00psarobePrioritynormal => immediate
2009-03-24 11:00psarobeSeveritymajor => critical
2009-03-24 11:00rafarodaRelationship addedrelated to 0007957
2009-03-24 11:00psarobePriorityimmediate => urgent
2009-03-24 15:00rafarodaNote Added: 0014903
2009-03-24 15:00rafarodaAssigned Torafaroda => AinhoaPagola
2009-03-24 22:39hgbotCheckin
2009-03-24 22:39hgbotNote Added: 0014914
2009-03-24 22:39hgbotStatusscheduled => resolved
2009-03-24 22:39hgbotResolutionopen => fixed
2009-03-24 22:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/f7aa3d4e5e5592382445dc7d6cca70212bdb834d [^]
2009-05-10 19:37psarobeFixed in Version => 2.40MP4
2009-05-11 07:59arunkumarStatusresolved => closed
2009-05-11 07:59arunkumarNote Added: 0016214

Notes
(0014903)
rafaroda   
2009-03-24 15:00   
Fix for trunk was done in https://dev.openbravo.com/websvn/openbravo/?op=comp&compare[]=%2F@1170&compare[]=%2F@1171 [^]
(0014914)
hgbot   
2009-03-24 22:39   
Repository: erp/stable/2.40
Changeset: f7aa3d4e5e5592382445dc7d6cca70212bdb834d
Author: Ainhoa Pagola <ainhoa.pagola <at> openbravo.com>
Date: Tue Mar 24 22:37:08 2009 +0100
URL: http://code.openbravo.com/erp/stable/2.40/rev/f7aa3d4e5e5592382445dc7d6cca70212bdb834d [^]

Fixes bug 0008246 Initial client setup fails: null in c_currency_id

---
M src/org/openbravo/erpCommon/ad_forms/InitialClientSetup.java
M src/org/openbravo/erpCommon/ad_forms/InitialClientSetup_data.xsql
---
(0016214)
arunkumar   
2009-05-11 07:59   
This issue has been fixed.