We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose email 18.10 fails to set license


After upgrading from 18.9 to 18.10 License.setLicense() started to fail with exception:

com.aspose.email.system.exceptions.InvalidOperationException: Failed to set license. Details: 

The stacktrace doesn’t provide any info, only the call trace.



It is requested to please share your license file in private message with us, so that we could investigate the issue. In order to send a private message, please click on my name and find “Message” button.

Moreover, please do not share your license file publicly.


We have received license file. We have tested it with Aspose.Email for Java 18.10 and it is working fine.
It is therefore requested to kindly share your code with us and also share details of your work environment like OS, JDK version etc. So that we could investigate it.

Here’s the code:

import com.aspose.email.License;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

public class PstLicenseConfiguration {

    private static final Logger logger = LoggerFactory.getLogger(PstLicenseConfiguration.class);

    private static final String LICENSE_FILE_PATH = "Aspose.Email.lic";
    private final License license;

    public PstLicenseConfiguration() {
        license = new License();
        logger.info("Aspose.Email license was successfully set");

    public boolean isLicensed() {
        return license.isLicensed();

Here’s how I import the library:



VERSION="16.04.5 LTS (Xenial Xerus)"
PRETTY_NAME="Ubuntu 16.04.5 LTS"


java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)


Thank you for the details.
We have logged this issue with ID “EMAILJAVA-34457” for further investigation. You will automatically be informed here once we have more information to share.


We have prepared hot fix release Aspose.Email 18.10.1 for this issue.
Please download at this link:

You may need to install JAR to Maven local repository as given below:

mvn install:install-file "-Dfile=aspose-email-18.10.1-jdk16.jar" "-DgroupId=com.aspose" "-DartifactId=aspose-email" "-Dversion=18.10.1" "-Dclassifier=jdk16" "-Dpackaging=jar"

Maven dependency settings are as follows:


Furthermore, please share your feedback regarding this issue.

The issues you have found earlier (filed as EMAILJAVA-34457) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan