Aspose email 18.10 fails to set license

Hello

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: 
com.aspose.email.License.setLicense(SourceFile:338)
...

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

Thanks!

@Zeruch

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.

@Zeruch

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;

@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();
        license.setLicense(LICENSE_FILE_PATH);
        logger.info("Aspose.Email license was successfully set");
    }

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

Here’s how I import the library:

        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-email</artifactId>
            <version>18.10</version>
            <classifier>jdk16</classifier>
        </dependency>

OS:

NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

OpenJDK:

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)

@Zeruch

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.

@Zeruch

We have prepared hot fix release Aspose.Email 18.10.1 for this issue.
Please download at this link:
https://www.dropbox.com/s/hpttbk30emu8nrj/aspose-email-18.10.1-java.zip?dl=0

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:

<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-email</artifactId>
<version>18.10.1</version>
<classifier>jdk16</classifier>
</dependency>

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