Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public boolean isValid(DatasetFieldValue value, ConstraintValidatorContext conte
try {
Double.parseDouble(value.getValue());
} catch (Exception e) {
logger.fine("Float value failed validation: " + value.getValue() + " (" + dsfType.getDisplayName() + ")");
logger.warning("Float value failed validation: " + value.getValue() + " (" + dsfType.getDisplayName() + ")");
try {
context.buildConstraintViolationWithTemplate(dsfType.getDisplayName() + " is not a valid number.").addConstraintViolation();
} catch (NullPointerException npe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public DatasetLinkingDataverse findDatasetLinkingDataverse(Long datasetId, Long
.setParameter("dataverseId", linkingDataverseId)
.getSingleResult();
} catch (javax.persistence.NoResultException e) {
logger.fine("no datasetLinkingDataverse found for datasetId " + datasetId + " and linkingDataverseId " + linkingDataverseId);
logger.warning("no datasetLinkingDataverse found for datasetId " + datasetId + " and linkingDataverseId " + linkingDataverseId);
}
return foundDatasetLinkingDataverse;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public boolean isThisVersionSearchable() {
try {
queryResponse = solrClientService.getSolrClient().query(solrQuery);
} catch (Exception ex) {
logger.fine("Solr exception: " + ex.getLocalizedMessage());
logger.warning("Solr exception: " + ex.getLocalizedMessage());
// solr maybe down/some error may have occurred...
return false;
}
Expand Down Expand Up @@ -857,7 +857,7 @@ public Set<Long> getFileIdsInVersionFromSolr(Long datasetVersionId, String patte
try {
queryResponse = solrClientService.getSolrClient().query(solrQuery);
} catch (HttpSolrClient.RemoteSolrException ex) {
logger.fine("Remote Solr Exception: " + ex.getLocalizedMessage());
logger.warning("Remote Solr Exception: " + ex.getLocalizedMessage());
String msg = ex.getLocalizedMessage();
if (msg.contains(SearchFields.FILE_DELETED)) {
fileDeletedFlagNotIndexed = true;
Expand Down Expand Up @@ -959,7 +959,7 @@ public SwiftAccessIO getSwiftObject() {
logger.fine("DatasetPage: Failed to cast storageIO as SwiftAccessIO (most likely because storageIO is a FileAccessIO)");
}
} catch (IOException e) {
logger.fine("DatasetPage: Failed to get storageIO");
logger.warning("DatasetPage: Failed to get storageIO");

}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public DataverseLinkingDataverse findDataverseLinkingDataverse(Long dataverseId,
.setParameter("linkingDataverseId", linkingDataverseId)
.getSingleResult();
} catch (javax.persistence.NoResultException e) {
logger.fine("No DataverseLinkingDataverse found for dataverseId " + dataverseId + " and linkedDataverseId " + linkingDataverseId);
logger.warning("No DataverseLinkingDataverse found for dataverseId " + dataverseId + " and linkedDataverseId " + linkingDataverseId);
}
return foundDataverseLinkingDataverse;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public Dataverse findByAlias(String anAlias) {
.setParameter("alias", anAlias.toLowerCase())
.getSingleResult();
} catch ( NoResultException|NonUniqueResultException ex ) {
logger.fine("Unable to find a single dataverse using alias \"" + anAlias + "\": " + ex);
logger.warning("Unable to find a single dataverse using alias \"" + anAlias + "\": " + ex);
return null;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/edu/harvard/iq/dataverse/FilePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,10 @@ public SwiftAccessIO getSwiftObject() {
if (storageIO != null && storageIO instanceof SwiftAccessIO) {
return (SwiftAccessIO)storageIO;
} else {
logger.fine("FilePage: Failed to cast storageIO as SwiftAccessIO");
logger.warning("FilePage: Failed to cast storageIO as SwiftAccessIO");
}
} catch (IOException e) {
logger.fine("FilePage: Failed to get storageIO");
logger.warning("FilePage: Failed to get storageIO");
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public void handleImageFooterFileUpload(FileUploadEvent event) {
editDv.getDataverseTheme().setLogoFooter(uFile.getFileName());

} catch (IOException e) {
logger.finer("caught IOException");
logger.warning("Error uploading logo file: " + e);
logger.throwing("ThemeWidgetFragment", "handleImageFileUpload", e);
throw new RuntimeException("Error uploading logo file", e); // improve error handling
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public Dataset doImportHarvestedDataset(DataverseRequest dataverseRequest, Harve
importedDataset = engineSvc.submit(new CreateHarvestedDatasetCommand(ds, dataverseRequest));

} catch (JsonParseException | ImportException | CommandException ex) {
logger.fine("Failed to import harvested dataset: " + ex.getClass() + ": " + ex.getMessage());
logger.warning("Failed to import harvested dataset: " + ex.getClass() + ": " + ex.getMessage());
FileOutputStream savedJsonFileStream = new FileOutputStream(new File(metadataFile.getAbsolutePath() + ".json"));
byte[] jsonBytes = json.getBytes();
int i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private ConfirmEmailData findSingleConfirmEmailDataByToken(String token) {
try {
confirmEmailData = typedQuery.getSingleResult();
} catch (NoResultException | NonUniqueResultException ex) {
logger.fine("When looking up " + token + " caught " + ex);
logger.warning("When looking up " + token + " caught " + ex);
}
return confirmEmailData;
}
Expand All @@ -188,7 +188,7 @@ public ConfirmEmailData findSingleConfirmEmailDataByUser(AuthenticatedUser user)
try {
confirmEmailData = typedQuery.getSingleResult();
} catch (NoResultException | NonUniqueResultException ex) {
logger.fine("When looking up user " + user + " caught " + ex);
logger.warning("When looking up user " + user + " caught " + ex);
}
return confirmEmailData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static StorageIO<DataFile> performFormatConversion(DataFile file, Storage
convertedFileStream = Channels.newInputStream((ReadableByteChannel) storageIO.openAuxChannel(formatRequested));
convertedFileSize = storageIO.getAuxObjectSize(formatRequested);
} catch (IOException ioex) {
logger.fine("No cached copy for file format "+formatRequested+", file "+file.getStorageIdentifier());
logger.warning("No cached copy for file format "+formatRequested+", file "+file.getStorageIdentifier());
convertedFileStream = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private static boolean generateWorldMapThumbnail(StorageIO<DataFile> storageIO,
return false;
}
} catch (FileNotFoundException fnfe) {
logger.fine("No .img file for this worldmap file yet; giving up. Original Error: " + fnfe);
logger.warning("No .img file for this worldmap file yet; giving up. Original Error: " + fnfe);
return false;

} catch (IOException ioex) {
Expand Down Expand Up @@ -365,7 +365,7 @@ private static boolean generateImageThumbnailFromInputStream(StorageIO<DataFile>
outputStream = Channels.newOutputStream((WritableByteChannel) outputChannel);
logger.fine("Opened an auxiliary channel/output stream " + THUMBNAIL_SUFFIX + size + " on " + storageIO.getDataFile().getStorageIdentifier());
} catch (Exception ioex) {
logger.fine("Failed to open an auxiliary channel/output stream " + THUMBNAIL_SUFFIX + size + " on " + storageIO.getDataFile().getStorageIdentifier());
logger.warning("Failed to open an auxiliary channel/output stream " + THUMBNAIL_SUFFIX + size + " on " + storageIO.getDataFile().getStorageIdentifier());
tempFileRequired = true;
}

Expand All @@ -374,7 +374,7 @@ private static boolean generateImageThumbnailFromInputStream(StorageIO<DataFile>
tempFile = File.createTempFile("tempFileToRescale", ".tmp");
outputStream = new FileOutputStream(tempFile);
} catch (IOException ioex) {
logger.fine("GenerateImageThumb: failed to open a temporary file.");
logger.warning("GenerateImageThumb: failed to open a temporary file.");
return false;
}
}
Expand Down Expand Up @@ -410,7 +410,7 @@ private static boolean isThumbnailCached(StorageIO<DataFile> storageIO, int size
try {
cached = storageIO.isAuxObjectCached(THUMBNAIL_SUFFIX + size);
} catch (Exception ioex) {
logger.fine("caught Exception while checking for a cached thumbnail (file " + storageIO.getDataFile().getStorageIdentifier() + ")");
logger.warning("caught Exception while checking for a cached thumbnail (file " + storageIO.getDataFile().getStorageIdentifier() + ")");
return false;
}

Expand Down Expand Up @@ -445,7 +445,7 @@ public static String getImageThumbnailAsBase64(DataFile file, int size) {
try {
storageIO = file.getStorageIO();
} catch (Exception ioEx) {
logger.fine("Caught an exception while trying to obtain a thumbnail as Base64 string - could not open StorageIO on the datafile.");
logger.warning("Caught an exception while trying to obtain a thumbnail as Base64 string - could not open StorageIO on the datafile.");
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ public InputStream getAuxFileAsInputStream(String auxItemTag) throws IOException
}
return null;
} catch (AmazonClientException ase) {
logger.fine("Caught an AmazonClientException in S3AccessIO.getAuxFileAsInputStream() (object not cached?): " + ase.getMessage());
logger.warning("Caught an AmazonClientException in S3AccessIO.getAuxFileAsInputStream() (object not cached?): " + ase.getMessage());
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static DatasetThumbnail getThumbnail(Dataset dataset, DatasetVersion data
in = dataAccess.getAuxFileAsInputStream(datasetLogoThumbnail + thumb48addedByImageThumbConverter);
}
} catch (IOException ex) {
logger.fine("Dataset-level thumbnail file does not exist, or failed to open; will try to find an image file that can be used as the thumbnail.");
logger.warning("Dataset-level thumbnail file does not exist, or failed to open; will try to find an image file that can be used as the thumbnail.");
}


Expand All @@ -141,7 +141,7 @@ public static DatasetThumbnail getThumbnail(Dataset dataset, DatasetVersion data
logger.fine("will get thumbnail from dataset logo");
return datasetThumbnail;
} catch (IOException ex) {
logger.fine("Unable to read thumbnail image from file: " + ex);
logger.warning("Unable to read thumbnail image from file: " + ex);
return null;
} finally
{
Expand Down Expand Up @@ -344,7 +344,7 @@ public static Dataset persistDatasetLogoToStorageAndCreateThumbnail(Dataset data
try {
Files.delete(Paths.get(thumbFileLocation));
} catch (IOException ioex) {
logger.fine("Failed to delete temporary thumbnail file");
logger.warning("Failed to delete temporary thumbnail file");
}

logger.fine("Thumbnail saved to " + thumbFileLocation + ". Temporary file deleted : " + tmpFileWasDeleted + ". Original file deleted : " + originalTempFileWasDeleted);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public HarvestingClient findByNickname(String nickName) {
.setParameter("nickName", nickName.toLowerCase())
.getSingleResult();
} catch ( NoResultException|NonUniqueResultException ex ) {
logger.fine("Unable to find a single harvesting client by nickname \"" + nickName + "\": " + ex);
logger.warning("Unable to find a single harvesting client by nickname \"" + nickName + "\": " + ex);
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void exportAllFormatsInNewTransaction(Dataset dataset) throws ExportExcep
exportServiceInstance.exportAllFormats(dataset);
datasetService.updateLastExportTimeStamp(dataset.getId());
} catch (Exception e) {
logger.fine("Caught unknown exception while trying to export");
logger.warning("Caught unknown exception while trying to export");
throw new ExportException(e.getMessage());
}
}
Expand Down Expand Up @@ -348,7 +348,7 @@ public List<OAIRecord> findOaiRecordsBySetName(String setName, Date from, Date u
try {
return query.getResultList();
} catch (Exception ex) {
logger.fine("Caught exception; returning null.");
logger.warning("Caught exception; returning null.");
return null;
}
}
Expand All @@ -367,7 +367,7 @@ public List<OAIRecord> findActiveOaiRecordsBySetName(String setName) {
try {
return query.getResultList();
} catch (Exception ex) {
logger.fine("Caught exception; returning null.");
logger.warning("Caught exception; returning null.");
return null;
}
}
Expand All @@ -386,7 +386,7 @@ public List<OAIRecord> findDeletedOaiRecordsBySetName(String setName) {
try {
return query.getResultList();
} catch (Exception ex) {
logger.fine("Caught exception; returning null.");
logger.warning("Caught exception; returning null.");
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static RoleAssignee identifier2roleAssignee(String identifier) {
try {
datasetId = new Long(parts[1]);
} catch (ArrayIndexOutOfBoundsException | NumberFormatException ex) {
logger.fine("Could not find dataset id in '" + identifier + "': " + ex);
logger.warning("Could not find dataset id in '" + identifier + "': " + ex);
return null;
}
return new PrivateUrlUser(datasetId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public Future<String> indexDataset(Dataset dataset, boolean doNormalSolrDocClean
List<String> allFilesForDataset = findFilesOfParentDataset(dataset.getId());
solrIdsOfFilesToDelete.addAll(allFilesForDataset);
} catch (SearchException | NullPointerException ex) {
logger.fine("could not run search of files to delete: " + ex);
logger.warning("could not run search of files to delete: " + ex);
}
int numFiles = 0;
if (fileMetadatas != null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/util/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ private static boolean isGraphMLFile(File file) {
}
}
} catch(XMLStreamException e) {
logger.fine("XML error - this is not a valid graphML file.");
logger.warning("XML error - this is not a valid graphML file.");
isGraphML = false;
} catch(IOException e) {
throw new EJBException(e);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ public int getPVGoodStrength() {
try {
goodStrengthLength = Integer.parseInt(_goodStrengthLength);
} catch (NumberFormatException nfe) {
logger.fine("Invalid value for PVGoodStrength: " + _goodStrengthLength);
logger.warning("Invalid value for PVGoodStrength: " + _goodStrengthLength);
}
return goodStrengthLength;
}
Expand All @@ -732,7 +732,7 @@ public int getPVMinLength() {
try {
passportValidatorMinLength = Integer.parseInt(_passportValidatorMinLength);
} catch (NumberFormatException nfe) {
logger.fine("Invalid value for PwMinLength: " + _passportValidatorMinLength);
logger.warning("Invalid value for PwMinLength: " + _passportValidatorMinLength);
}
return passportValidatorMinLength;
}
Expand All @@ -750,7 +750,7 @@ public int getPVMaxLength() {
try {
passportValidatorMaxLength = Integer.parseInt(_passportValidatorMaxLength);
} catch (NumberFormatException nfe) {
logger.fine("Invalid value for PwMaxLength: " + _passportValidatorMaxLength);
logger.warning("Invalid value for PwMaxLength: " + _passportValidatorMaxLength);
}
return passportValidatorMaxLength;
}
Expand Down Expand Up @@ -789,7 +789,7 @@ public int getPVNumberOfCharacteristics() {
try {
numberOfCharacteristics = Integer.parseInt(_numberOfCharacteristics);
} catch (NumberFormatException nfe) {
logger.fine("Invalid value for PVNumberOfCharacteristics: " + _numberOfCharacteristics);
logger.warning("Invalid value for PVNumberOfCharacteristics: " + _numberOfCharacteristics);
}
return numberOfCharacteristics;
}
Expand All @@ -804,7 +804,7 @@ public int getPVNumberOfConsecutiveDigitsAllowed() {
try {
numConsecutiveDigitsAllowed = Integer.parseInt(_numberOfConsecutiveDigitsAllowed);
} catch (NumberFormatException nfe) {
logger.fine("Invalid value for " + SettingsServiceBean.Key.PVNumberOfConsecutiveDigitsAllowed + ": " + _numberOfConsecutiveDigitsAllowed);
logger.warning("Invalid value for " + SettingsServiceBean.Key.PVNumberOfConsecutiveDigitsAllowed + ": " + _numberOfConsecutiveDigitsAllowed);
}
return numConsecutiveDigitsAllowed;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ private static byte[] inputStreamToBytes(InputStream inputStream) {
try {
return IOUtils.toByteArray(inputStream);
} catch (IOException ex) {
logger.fine("In inputStreamToBytes but caught an IOUtils.toByteArray Returning null.");
logger.warning("In inputStreamToBytes but caught an IOUtils.toByteArray Returning null.");
return null;
}
}
Expand Down