=== modified file 'src/com/goldencode/p2j/cfg/Configuration.java'
--- src/com/goldencode/p2j/cfg/Configuration.java	2020-01-22 13:10:12 +0000
+++ src/com/goldencode/p2j/cfg/Configuration.java	2020-06-17 16:02:55 +0000
@@ -2,7 +2,7 @@
 ** Module   : Configuration.java
 ** Abstract : Master configuration object
 **
-** Copyright (c) 2004-2019, Golden Code Development Corporation.
+** Copyright (c) 2004-2020, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- --JPRM-- ----------------------------Description-----------------------------
 ** 001 ECF 20041217   @19157 Created initial version.
@@ -59,6 +59,7 @@
 ** 021 ECF 20190619          Added configuration for include file reference prefix remapping.
 **     GES 20190621          Fixed include file prefix processing to allow projects that don't
 **                           have it configured (previous version caused an NPE in every parse).
+** 022 IAS 20200617          No fatal error if p2j.cfg.xml is not found.
 */
 
 /*
@@ -118,12 +119,15 @@
 
 import java.io.*;
 import java.util.*;
+
 import javax.xml.parsers.*;
+
 import org.xml.sax.*;
-import com.goldencode.util.*;
+
 import com.goldencode.p2j.schema.*;
 import com.goldencode.p2j.schema.SchemaConfig.*;
 import com.goldencode.p2j.schema.SchemaConfig.NsConfig.*;
+import com.goldencode.util.*;
 
 /**
  * Master configuration object which loads subsystem configurations. The
@@ -363,7 +367,9 @@
     */
    public static SchemaConfig getSchemaConfig()
    {
-      return (SchemaConfig) getInstance().saxHandler.getGlobalObjects(TAG_SCHEMA).get(0);
+      Configuration cfg = getInstance();
+      return cfg.saxHandler == null ? new SchemaConfig() : 
+         (SchemaConfig) cfg.saxHandler.getGlobalObjects(TAG_SCHEMA).get(0);
    }
 
    /**
@@ -773,7 +779,7 @@
             
             if (cfgStream == null)
             {
-               throw new ConfigurationException("Cannot find resource " + path);
+               return config;
             }
          }
          else
@@ -1180,4 +1186,4 @@
          return map;
       }
    }
-}
\ No newline at end of file
+}

=== modified file 'src/com/goldencode/p2j/persist/meta/MetadataManager.java'
--- src/com/goldencode/p2j/persist/meta/MetadataManager.java	2020-06-13 08:48:53 +0000
+++ src/com/goldencode/p2j/persist/meta/MetadataManager.java	2020-06-17 17:48:11 +0000
@@ -17,6 +17,7 @@
 ** 009 OM  20181207 Populated DatabaseFeature metadata table.
 ** 010 IAS 20200518 Populating _File, _Field, _Index, and _Index-Field metadata tables.
 ** 011 IAS 20200604 Added support for *-SA and CAN-* fields in _File/_Field tables.
+** 012 IAS 20200617 No fatal error if p2j.cfg.xml is not found; mandatory meta tables support
  */
 /*
 ** This program is free software: you can redistribute it and/or modify
@@ -84,9 +85,6 @@
 import java.util.logging.*;
 import java.util.stream.*;
 
-import org.aspectj.org.eclipse.jdt.internal.formatter.linewrap.*;
-import org.aspectj.weaver.ast.*;
-import org.hibernate.bytecode.instrumentation.internal.javassist.*;
 import org.hibernate.dialect.*;
 import org.w3c.dom.*;
 
@@ -204,7 +202,7 @@
    public static boolean initialize()
    throws PersistenceException
    {
-      if (!Configuration.getSchemaConfig().isMetadataActive())
+      if (Configuration.getSchemaConfig().getMetadata() == null)
       {
          if (log.isLoggable(Level.INFO))
          {
@@ -216,7 +214,8 @@
       String basePkg = DMOIndex.getBasePackage();
       baseDir = basePkg.replaceAll("\\.", "/");
 
-      Set<String> legacyTables = Configuration.getSchemaConfig().getMetadata().getTables();
+      Set<String> legacyTables = SystemTable.mandatoryTables(); 
+      legacyTables.addAll(Configuration.getSchemaConfig().getMetadata().getTables());
       for (String aTable : legacyTables)
       {
          SystemTable systemTable = SystemTable.forName(aTable);
@@ -408,6 +407,14 @@
    public static void populateDatabase(Database metaDb, String schema)
    throws PersistenceException
    {
+      if (!Configuration.getSchemaConfig().isMetadataActive())
+      {
+         if (log.isLoggable(Level.INFO))
+         {
+            log.log(Level.INFO, "Metadata server was not started; no metadata in use");
+         }
+         return;
+      }
       SchemaConfig.Metadata metadata = com.goldencode.p2j.cfg.Configuration.
             getSchemaConfig().getMetadata();
       String path = String.format("%s/%s/%s.meta.xml", baseDir, schema, schema);
@@ -1337,7 +1344,7 @@
       /** */
       _Code_Feature(-16428, "_Code-Feature", Category.VST),
       /** */
-      _Database_Feature(-16427, "_Database-Feature", Category.VST, 
+      _Database_Feature(-16427, "_Database-Feature", Category.VST, MANDATORY, 
             MetadataManager::populateDatabaseFeatures),
       /** Provides detailed information about an OpenEdge Replication agent. */
       _Repl_Agent(-16426, "_Repl-Agent", Category.VST),
@@ -1351,7 +1358,7 @@
       /** */
       _AreaStatus(-16423, "_AreaStatus", Category.VST), 
       /** */
-      _MyConnection(-16422, "_MyConnection", Category.VST),
+      _MyConnection(-16422, "_MyConnection", Category.VST , MANDATORY),
       /** */
       _UserStatus(-16421, "_UserStatus", Category.VST), 
       /** */
@@ -1409,9 +1416,9 @@
       /** */
       _UserLock(-16394, "_UserLock", Category.VST),
       /** */
-      _Filelist(-16393, "_Filelist", Category.VST), 
+      _Filelist(-16393, "_Filelist", Category.VST, MANDATORY), 
       /** */
-      _Startup(-16392, "_Startup", Category.VST), 
+      _Startup(-16392, "_Startup", Category.VST, MANDATORY), 
       /** */
       _Servers(-16391, "_Servers", Category.VST),
       /** */
@@ -1425,7 +1432,7 @@
       /** */
       _MstrBlk(-16386, "_MstrBlk", Category.VST), 
       /** */
-      _Connect(-16385, "_Connect", Category.VST),
+      _Connect(-16385, "_Connect", Category.VST, MANDATORY),
       /** */
       _Constraint_Keys(-361, "_Constraint-Keys", Category.DS_SCHEMA),
       /** */
@@ -1545,7 +1552,7 @@
       /** */
       _AreaExtent(-72, "_AreaExtent", Category.PHY_ST),
       /** */
-      _Area(-71, "_Area", Category.PHY_ST), 
+      _Area(-71, "_Area", Category.PHY_ST, MANDATORY), 
       /** */
       _StorageObject(-70, "_StorageObject", Category.PHY_ST),
       /** */
@@ -1553,11 +1560,11 @@
       /** */
       _Codepage(-68, "_Codepage", Category.SCHEMA),
       /** */
-      _Sequence(-67, "_Sequence", Category.SCHEMA), 
-      /** */
-      _Field_Trig(-66, "_Field-Trig", Category.SCHEMA),
-      /** */
-      _File_Trig(-65, "_File-Trig", Category.SCHEMA), 
+      _Sequence(-67, "_Sequence", Category.SCHEMA, MANDATORY), 
+      /** */
+      _Field_Trig(-66, "_Field-Trig", Category.SCHEMA, MANDATORY),
+      /** */
+      _File_Trig(-65, "_File-Trig", Category.SCHEMA, MANDATORY), 
       /** */
       _View_Ref(-32, "_View-Ref", Category.SQL89),
       /** */
@@ -1565,17 +1572,17 @@
       /** */
       _View(-30, "_View", Category.SQL89), 
       /** */
-      _Db(-6, "_Db", Category.SCHEMA),
-      /** */
-      _User(-5, "_User", Category.AUTH, REGULAR), 
-      /** */
-      _Index_Field(-4, "_Index-Field", Category.SCHEMA, IGNORE_META_XML),
-      /** */
-      _Index(-3, "_Index", Category.SCHEMA, IGNORE_META_XML), 
-      /** */
-      _Field(-2, "_Field", Category.SCHEMA, IGNORE_META_XML), 
-      /** */
-      _File(-1, "_File", Category.SCHEMA, IGNORE_META_XML, MetadataManager::populateFileTable);
+      _Db(-6, "_Db", Category.SCHEMA, MANDATORY),
+      /** */
+      _User(-5, "_User", Category.AUTH, REGULAR | MANDATORY), 
+      /** */
+      _Index_Field(-4, "_Index-Field", Category.SCHEMA, IGNORE_META_XML | MANDATORY),
+      /** */
+      _Index(-3, "_Index", Category.SCHEMA, IGNORE_META_XML | MANDATORY), 
+      /** */
+      _Field(-2, "_Field", Category.SCHEMA, IGNORE_META_XML | MANDATORY), 
+      /** */
+      _File(-1, "_File", Category.SCHEMA, IGNORE_META_XML | MANDATORY, MetadataManager::populateFileTable);
 
       /** Table id */
       public final int _file_num;
@@ -1875,4 +1882,4 @@
                   build();
       }
    }
-}
\ No newline at end of file
+}

=== modified file 'src/com/goldencode/p2j/schema/SchemaConfig.java'
--- src/com/goldencode/p2j/schema/SchemaConfig.java	2018-01-18 18:54:35 +0000
+++ src/com/goldencode/p2j/schema/SchemaConfig.java	2020-06-17 15:03:59 +0000
@@ -2,7 +2,7 @@
 ** Module   : SchemaConfig.java
 ** Abstract : Schema configuration information
 **
-** Copyright (c) 2004-2018, Golden Code Development Corporation.
+** Copyright (c) 2004-2020, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- --JPRM-- -----------------------------Description-----------------------------
 ** 001 ECF 20041217   @19174 Created initial version.
@@ -35,6 +35,7 @@
 ** 014 IAS 20160509          Fixed metadata processing in case of more than one 
 **                           default namespace.
 ** 015 OM  20180118          Removed notion of primary database.
+** 016 IAS 20200617          Added mandatory meta tables support.
 */
 
 /*
@@ -95,6 +96,7 @@
 import java.io.*;
 import java.util.*;
 import com.goldencode.p2j.cfg.*;
+import com.goldencode.p2j.persist.meta.MetadataManager.*;
 
 /**
  * Schema configuration information. This class is instantiated by the master {@link
@@ -149,7 +151,8 @@
     */
    public boolean isMetadataActive()
    {
-      return !metadata.getTables().isEmpty();
+      return metadata != null && 
+            !metadata.getTables().isEmpty() || !SystemTable.mandatoryTables().isEmpty();
    }
    
    /**

