Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0011271 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2009-11-08 08:29 | 2009-12-31 00:00 | |||
Reporter | thirumalaik | View Status | public | |||||
Assigned To | rafaroda | |||||||
Priority | normal | Resolution | duplicate | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_11 | |||
OS Version | rPath Linux | Database version | 8.3.5 | Ant version | 1.7.1 | |||
Product Version | 2.50MP7 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0011271: Function not created(failed) when installing module. | |||||||
Description | I import a obx file and build it.After that i found all functions were missinf. So that,again i gave command ant update.database -Dmodule='module java package'. In that i found all functions failed because of error:-SQL Command failed with: ERROR: syntax error at or near "AD_UPDATE_PINSTANCE". It was happened due to this code'PERFORM PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ;' There are two consecutive PERFORM in code.I go to src-db/database/model/functions and checked that function xml file.In xml file syntax is correct as follows, PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ;' | |||||||
Steps To Reproduce | Install a module obx file(with functions in postgre) and rebuild it. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0022249) rafaroda (viewer) 2009-11-30 09:29 |
Please attach an example OBX file http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines [^] |
(0022317) rafaroda (viewer) 2009-12-01 16:31 |
Reminder sent to: thirumalaik Any update on this issue? Thanks. |
(0022339) thirumalaik (viewer) 2009-12-02 05:25 |
Hi Rafa, I attached a sample obx file. I checked with latest mercurial code,the issue is still remain. Please refer this forum message, http://forge.openbravo.com/plugins/espforum/view.php?group_id=100&forumid=681613&topicid=7006464&topid=7006515 [^] |
(0022341) thirumalaik (viewer) 2009-12-02 06:25 |
Output, SQL Command failed with: ERROR: syntax error at or near "AD_UPDATE_PINSTANCE" [java] -- END [java] -- ----------------------------------------------------------------------- [java] -- FUNCTION KA00007_CONTRACT_INVOICE [java] -- ----------------------------------------------------------------------- [java] CREATE FUNCTION KA00007_CONTRACT_INVOICE(p_pinstance_id IN VARCHAR) RETURNS VOID [java] [java] AS $BODY$ DECLARE [java] --TYPE RECORD IS REFCURSOR; [java] Cur_Parameter RECORD; [java] v_Record_ID VARCHAR(32); [java] v_UpdatedBy varchar(32); [java] v_Result NUMERIC:=1; [java] v_Message VARCHAR(2000):=''; [java] v_clientid VARCHAR(32); [java] v_orgid VARCHAR(32); [java] v_documentno VARCHAR(32); [java] v_bpartner VARCHAR(32); [java] v_bpartnerloc VARCHAR(32); [java] v_dateopen TIMESTAMP; [java] v_workstatus VARCHAR(32); [java] v_desc VARCHAR(150); [java] v_product VARCHAR(32); [java] v_price NUMERIC; [java] v_period NUMERIC; [java] v_invoiceid VARCHAR(32); [java] [java] [java] BEGIN [java] IF(p_PInstance_ID IS NOT NULL) THEN [java] FOR Cur_Parameter IN [java] (SELECT i.Record_ID, [java] i.AD_User_ID, [java] p.ParameterName, [java] p.P_String, [java] p.P_Number, [java] p.P_Date,i.Updatedby [java] FROM AD_PINSTANCE i [java] LEFT JOIN AD_PINSTANCE_PARA p [java] ON i.AD_PInstance_ID=p.AD_PInstance_ID [java] WHERE i.AD_PInstance_ID=p_PInstance_ID [java] ORDER BY p.SeqNo [java] ) [java] LOOP [java] v_Record_ID:=Cur_Parameter.Record_ID; [java] v_UpdatedBy:=Cur_Parameter.Updatedby; [java] [java] -- Get Parameter [java] RAISE NOTICE '%',' v_Record_ID=' || v_Record_ID ; [java] [java] END LOOP; [java] [java] select ad_client_id,ad_org_id,'CON-'||documentno,c_bpartner_id,c_bpartner_location_id, [java] dateopened,worder_status,description,m_product_id,total_price,contract_period,c_invoice_id [java] into [java] v_clientid,v_orgid,v_documentno,v_bpartner,v_bpartnerloc,v_dateopen,v_workstatus, [java] v_desc,v_product,v_price,v_period,v_invoiceid from ka00007_contract where ka00007_contract_id=v_Record_ID; [java] [java] IF (v_workstatus='C' and v_invoiceid is null) THEN [java] [java] select get_uuid() into v_invoiceid from dual; [java] [java] insert into c_invoice (c_invoice_id,ad_client_id,ad_org_id,createdby,updatedby, [java] issotrx,documentno,docstatus,docaction, [java] processing,processed,posted,c_doctype_id,c_doctypetarget_id, [java] dateinvoiced,dateacct,c_bpartner_id,c_bpartner_location_id,c_currency_id, [java] paymentrule,c_paymentterm_id,m_pricelist_id,taxdate,description) [java] values(v_invoiceid,v_clientid,v_orgid,v_updatedby,v_updatedby, [java] 'Y',v_documentno,'DR','CO', [java] 'N','N','N','0','1000001', [java] v_dateopen,v_dateopen,v_bpartner,v_bpartnerloc,'317', [java] '5','1000002','1000003',v_dateopen,v_desc); [java] [java] insert into c_invoiceline (c_invoiceline_id,c_invoice_id,ad_client_id,ad_org_id,createdby,updatedby, [java] line,description,m_product_id,qtyinvoiced,pricelist,priceactual,pricelimit,linenetamt, [java] c_uom_id,c_tax_id,isdescription,pricestd,excludeforwithholding) [java] values(get_uuid(),v_invoiceid,v_clientid,v_orgid,v_updatedby,v_updatedby, [java] '10',v_desc,v_product,'1',v_price,v_price,v_price,v_price, [java] 100,'1000003','N',v_price,'N'); [java] [java] Update ka00007_contract set c_invoice_id=v_invoiceid where ka00007_contract_id=v_Record_ID; [java] [java] END IF; [java] [java] [java] PERFORM PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ; [java] END IF; [java] END ; $BODY$ LANGUAGE plpgsql; [java] SQL Command failed with: ERROR: syntax error at or near "AD_UPDATE_PINSTANCE" [java] -- END |
(0023128) thirumalaik (viewer) 2009-12-29 04:26 |
I summarized this issue as following. It was happened,when exporting module in Postgresql database. In xml file it add line "PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ;" instead of "AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ;" So that, when updating,it will add another 'PERFORM' and lead to syntax error like "PERFORM PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, v_UpdatedBy, 'N', v_Result, v_Message) ;". |
(0023135) shuehner (administrator) 2009-12-29 11:23 |
Hi thirumalaik, i think this issue is a duplicate of the 10829 issue, which is already fixed (but was not yet fixed in MP7). Can you please try upgrading your ERP instance to the latest available (MP9) and check if the issue still happens? You may need to fix the xml files of your module once to remove the PERFORM keyword. Thanks |
(0023149) thirumalaik (viewer) 2009-12-30 03:56 |
Hi Stefan, I removed perform in xml files and tested. It's working fine with 2.50 MP10. |
(0023152) shuehner (administrator) 2009-12-30 10:05 |
Close as duplicate which is already fixed in mp9 |
![]() |
|||
Date Modified | Username | Field | Change |
2009-11-08 08:29 | thirumalaik | New Issue | |
2009-11-08 08:29 | thirumalaik | Assigned To | => rafaroda |
2009-11-30 09:29 | rafaroda | OBNetwork customer | => No |
2009-11-30 09:29 | rafaroda | Note Added: 0022249 | |
2009-11-30 09:29 | rafaroda | Status | new => feedback |
2009-11-30 09:29 | rafaroda | Category | Z. Others => A. Platform |
2009-11-30 09:29 | rafaroda | Type | backport => defect |
2009-12-01 16:31 | rafaroda | Note Added: 0022317 | |
2009-12-02 05:06 | thirumalaik | File Added: com.kna.mod.con-0.0.5.obx | |
2009-12-02 05:25 | thirumalaik | Note Added: 0022339 | |
2009-12-02 06:25 | thirumalaik | Note Added: 0022341 | |
2009-12-29 04:26 | thirumalaik | Note Added: 0023128 | |
2009-12-29 11:21 | shuehner | Relationship added | related to 0010829 |
2009-12-29 11:23 | shuehner | Note Added: 0023135 | |
2009-12-30 03:56 | thirumalaik | Note Added: 0023149 | |
2009-12-30 10:05 | shuehner | Relationship replaced | duplicate of 0010829 |
2009-12-30 10:05 | shuehner | Note Added: 0023152 | |
2009-12-30 10:05 | shuehner | Status | feedback => closed |
2009-12-30 10:05 | shuehner | Duplicate ID | 0 => 10829 |
2009-12-30 10:05 | shuehner | Resolution | open => duplicate |
2009-12-31 00:00 | anonymous | sf_bug_id | 0 => 2923858 |
Copyright © 2000 - 2009 MantisBT Group |