Project

General

Profile

« Previous | Next » 

Revision 9256

Added by Jing Tao over 9 years ago

Add the code to handle if the cn is null.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
2239 2239
          //notify the cns the synchornize the new system metadata.
2240 2240
          this.cn = D1Client.getCN();
2241 2241
          try {
2242
              this.cn.synchronize(null, pid);
2242
              if(this.cn == null)  {
2243
                  logMetacat.warn("updateSystemMetadata - can't get the instance of the CN. So the system metadata in CN can't be updated.");
2244
              } else {
2245
                  this.cn.synchronize(null, pid);
2246
              }
2247
              
2243 2248
          } catch (Exception e) {
2249
              e.printStackTrace();
2244 2250
              logMetacat.error("Can't update the systemmetadata of pid "+pid.getValue()+" in CNs since "+e.getMessage());
2245 2251
          }
2246 2252
          

Also available in: Unified diff