Unresolved elements of 'Record_ID' in AttachmentElementHandler

Description

Hi,

I try to import the attached 2Pack zip via Pack In function. But encountered the below exception:

06:39:54.943-----------> PackInHandler.dumpUnresolvedElements: AD_Attachment [AD_Client_ID=0, AD_Org_ID=0, Record_ID=6573cc6b-9142-4043-a99d-f000514cc826, AD_Attachment_UU=8322a2d3-fdd1-457b-8006-29068e2890cf, TextMsg=, BinaryData=4.dat|byte[], AD_Table_ID=284, Title=zip, IsActive=true] unresolved [Record_ID] [82]
06:39:54.943===========> PackIn.importXML: importXML: [82]
org.adempiere.exceptions.AdempiereException: Unresolved elements
at org.adempiere.pipo2.PackIn.importXML(PackIn.java:183)
at org.adempiere.pipo2.PackIn.importXML(PackIn.java:136)
at org.adempiere.pipo2.PackInProcess.doIt(PackInProcess.java:143)
at org.compiere.process.SvrProcess.process(SvrProcess.java:220)
at org.compiere.process.SvrProcess.startProcess(SvrProcess.java:154)

It can be reproduced in test.idempiere.org. The 2Pack zip also attached.

In my local server, I made below changes in AttachmentElementHandler.java, then the problem solved, please have a double check.


public void startElement(PIPOContext ctx, Element element) throws SAXException { String action = null; MAttachment mAttachment = findPO(ctx, element); if (mAttachment == null) { mAttachment = new MAttachment(ctx.ctx, 0, getTrxName(ctx)); // To fix the issue unresolved [Record_ID] mAttachment.setAD_Table_ID(Integer.parseInt(element.properties.get("AD_Table_ID").contents.toString())); }

Thanks & BR,

Ken

Environment

None

Assignee

Carlos Ruiz

Reporter

ken longnan

Labels

None

Tested By

None

Components

Priority

Major
Configure