Hi there,
i hope you guys can help me. We have just purchased a new Site OEM
which i was hoping to include in our application.
private static void initializeAsposeLicense() {
LOG.info("Aspose Cells License will be read.");
try (final InputStream resourceAsStreamCell = App.class.getClassLoader()
.getResourceAsStream(ASPOSE_LICENSE_FILE)) {
if(resourceAsStreamCell != null) {
String text = new BufferedReader(
new InputStreamReader(resourceAsStreamCell, StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"));
// for testing purposes, we check what if anything we have read
LOG.info(text);
byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
InputStream targetStream = new ByteArrayInputStream(bytes);
ASPOSE_LICENSE_CELLS.setLicense(targetStream);
if (!License.isLicenseSet()) {
LOG.warn("Invalid aspose license");
return;
}
LOG.info("Aspose Cells License activated."); }
else {
LOG.warn("Aspose-License stream not available!");
}
} catch (final Exception e) {
LOG.warn("Unknown license problem", e);
}
}
We upgraded to the most recent Aspose Cellls version (22.3 at this moment) and our license will be expiring 20230407.
But the license doesn’t seem to get accepted, since we’ll end up in the LOG.warn(“Invalid aspose license”); part.
Any clues you might provide us?
Thanks in advance