Project

General

Profile

« Previous | Next » 

Revision 56610

do not log or propagate erroneous and potentially huge xml records. They might clog the information system

View differences:

OaiSetsIterator.java
97 97
		try {
98 98
			doc = reader.read(new StringReader(xml));
99 99
		} catch (DocumentException e) {
100
			log.warn("Error parsing xml, I try to clean it: " + xml, e);
100
			log.warn("Error parsing xml, I try to clean it", e);
101 101
			final String cleaned = XmlCleaner.cleanAllEntities(xml);
102 102
			try {
103 103
				doc = reader.read(new StringReader(cleaned));
104 104
			} catch (DocumentException e1) {
105
				throw new CollectorServiceException("Error parsing cleaned document:" + cleaned, e1);
105
				throw new CollectorServiceException("Error parsing cleaned document", e1);
106 106
			}
107 107
		}
108 108

  
......
126 126
		}
127 127
		if (sawAllSets) {
128 128
			log.warn("URL " + baseUrl + " keeps returning the same OAI sets. Please contact the repo admin.");
129
			System.out.println("URL " + baseUrl + " keeps returning the same OAI sets. Please contact the repo admin.");
130 129
			return null;
131 130
		} else return doc.valueOf("//*[local-name()='resumptionToken']");
132 131
	}

Also available in: Unified diff