diff --git a/base/src/org/adempiere/pipo/PackIn.java b/base/src/org/adempiere/pipo/PackIn.java index 81dd889b58..5b41fc0f8c 100644 --- a/base/src/org/adempiere/pipo/PackIn.java +++ b/base/src/org/adempiere/pipo/PackIn.java @@ -76,6 +76,7 @@ public class PackIn extends SvrProcess { PackInHandler handler = new PackInHandler(); handler.set_TrxName(trxName); handler.setCtx(ctx); + handler.setProcess(this); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); String msg = "Start Parser"; @@ -227,6 +228,7 @@ public class PackIn extends SvrProcess { // impXML.setUpdateMode(args[7]); impXML.m_UpdateMode = args[7]; + impXML.importXML(file, Env.getCtx(), null); System.exit(0); diff --git a/base/src/org/adempiere/pipo/PackInHandler.java b/base/src/org/adempiere/pipo/PackInHandler.java index c911058010..15c0df8e69 100644 --- a/base/src/org/adempiere/pipo/PackInHandler.java +++ b/base/src/org/adempiere/pipo/PackInHandler.java @@ -136,12 +136,14 @@ public class PackInHandler extends DefaultHandler { private List menus = new ArrayList(); private List defer = new ArrayList(); private Stack stack = new Stack(); + private PackIn packIn; private void init() throws SAXException { - PackIn pack = new PackIn(); - packageDirectory = pack.m_Package_Dir; - m_UpdateMode = pack.m_UpdateMode; - m_DatabaseType = pack.m_Database; + if (packIn == null) + packIn = new PackIn(); + packageDirectory = packIn.m_Package_Dir; + m_UpdateMode = packIn.m_UpdateMode; + m_DatabaseType = packIn.m_Database; File file = new File(""); SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssZ"); SimpleDateFormat formatter_log = new SimpleDateFormat("MM/dd/yy HH:mm:ss"); @@ -696,4 +698,11 @@ public class PackInHandler extends DefaultHandler { startElement = b; } } + + /** + * @param packIn + */ + public void setProcess(PackIn packIn) { + this.packIn = packIn; + } } // PackInHandler