Project

General

Profile

« Previous | Next » 

Revision 5950

Added by berkley almost 14 years ago

adding more debuggin and fixing bug with systemmetadata

View differences:

src/edu/ucsb/nceas/metacat/IdentifierManager.java
627 627
     */
628 628
    public void updateSystemMetadataMapping(String guid, String localId)
629 629
    {
630
        System.out.println("$$$$$$$$$$$$$$ updating systemmetadata table with additional info");
630 631
        int serialNumber = -1;
631 632
        DBConnection dbConn = null;
632 633
        try {
......
669 670
            // Return database connection to the pool
670 671
            DBConnectionPool.returnDBConnection(dbConn, serialNumber);
671 672
        }
673
        System.out.println("done updating systemmetadata");
672 674
    }
673 675
    
674 676
    /**
......
721 723
            stmt.close();
722 724
        } catch (SQLException e) {
723 725
            e.printStackTrace();
724
            logMetacat.error("SQL error while creating a mapping to the system metadata identifier: " 
726
            logMetacat.error("insertAdditionalSystemMetadataFields: SQL error while creating a mapping to the system metadata identifier: " 
725 727
                    + e.getMessage());
726 728
        } catch (NumberFormatException e) {
727 729
            e.printStackTrace();
728
            logMetacat.error("NumberFormat error while creating a mapping to the system metadata identifier: " 
730
            logMetacat.error("insertAdditionalSystemMetadataFields: NumberFormat error while creating a mapping to the system metadata identifier: " 
729 731
                    + e.getMessage());
730 732
        } finally {
731 733
            // Return database connection to the pool
......
1056 1058
            stmt.close();
1057 1059
        } catch (SQLException e) {
1058 1060
            e.printStackTrace();
1059
            logMetacat.warn("SQL error while creating a mapping to the system metadata identifier: " 
1061
            logMetacat.error("createGenericMapping: SQL error while creating a mapping to the " + type + " identifier: " 
1060 1062
                    + e.getMessage());
1061 1063
        } catch (NumberFormatException e) {
1062 1064
            e.printStackTrace();
1063
            logMetacat.error("NumberFormat error while creating a mapping to the system metadata identifier: " 
1065
            logMetacat.error("createGenericMapping: NumberFormat error while creating a mapping to the " + type + " identifier: " 
1064 1066
                    + e.getMessage());
1065 1067
        } catch (AccessionNumberException e) {
1066 1068
            e.printStackTrace();
1067
            logMetacat.error("AccessionNumber error while creating a mapping to the system metadata identifier: " 
1069
            logMetacat.error("createGenericMapping: AccessionNumber error while creating a mapping to the " + type + " identifier: " 
1068 1070
                    + e.getMessage());
1069 1071
        } finally {
1070 1072
            // Return database connection to the pool
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java
440 440
      {
441 441
          System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!creating mapping for systemMetadata: guid: " + guid + " localId: " + docinfoHash.get("docid"));
442 442
          idman.createSystemMetadataMapping(guid, docinfoHash.get("docid"));
443
          System.out.println("1");
444 443
          Long dateUploadedLong = new Long(docinfoHash.get("date_uploaded"));
445
          System.out.println("2");
446 444
          Long dateModifiedLong = new Long(docinfoHash.get("date_modified"));
447
          System.out.println("3");
448 445
          idman.insertAdditionalSystemMetadataFields(
449 446
                  dateUploadedLong.longValue(), 
450 447
                  docinfoHash.get("rights_holder"),
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java
578 578
        {
579 579
            logReplication.info("creating mapping for systemMetadata: guid: " + guid + " localId: " + docinfoHash.get("docid"));
580 580
            idman.createSystemMetadataMapping(guid, docinfoHash.get("docid"));
581
            logReplication.info("handleForceReplicateRequest: updating SM with additional info");
582
            System.out.println("!!!!!!!!!!!!!handleForceReplicateRequest: updating SM with additional info");
583
            Long dateUploadedLong = new Long(docinfoHash.get("date_uploaded"));
584
            Long dateModifiedLong = new Long(docinfoHash.get("date_modified"));
585
            idman.insertAdditionalSystemMetadataFields(
586
                    dateUploadedLong.longValue(), 
587
                    docinfoHash.get("rights_holder"),
588
                    docinfoHash.get("checksum"), 
589
                    docinfoHash.get("checksum_algorithm"), 
590
                    docinfoHash.get("origin_member_node"),
591
                    docinfoHash.get("authoritive_member_node"), 
592
                    dateModifiedLong.longValue(),
593
                    docinfoHash.get("submitter"),
594
                    docinfoHash.get("guid"),
595
                    docinfoHash.get("objectFormat"),
596
                    new Long(docinfoHash.get("size")).longValue());
581 597
        }
582 598
        else
583 599
        {

Also available in: Unified diff