public static void applyLicenseFromFile() {
try {
String userHome = System.getProperty(CftConstants.USER_HOME);
String pathLic = userHome + CftConstants.DOWNLOADS + “GroupDocs.Total.Java.lic”;
File licenseFile = new File(pathLic);
InputStream is = new FileInputStream(licenseFile);
com.groupdocs.viewer.licensing.License vLic = new com.groupdocs.viewer.licensing.License();GroupDocs.Total.Java.zip (745 Bytes)
vLic.setLicense(is);
logger.info("viladate license for view "+vLic.isValidLicense());
logger.info(pathLic);
} catch (Exception exp) {
logger.error("Exception: " + exp.getMessage());
exp.printStackTrace();
}
}
I have attached zip file for reference. Please do the needful asap.
Thanks,
Ritesh
1 Like
@rkrawa0018 ,
Please tell, which API version you integrated in your project (e.g. 19.10, 20.1)?
Version which i have used.
com.groupdocs
groupdocs-viewer
19.8.1
1 Like
@rkrawa0018 ,
Your license is valid for 19.8.1 release. Please share following details so that we can further investigate the issue:
Did you start facing this issue recently (license was working fine previously)?
Did you deploy license on some other machine (e.g. server)? If yes, please share complete server details.
Please share a simple console application using that issue could be reproduced at our end. Also share valid license file in a private message.
Hi,
License was not working fine previously.
Yes, I have deployed license on server. Please find remote details in private message
License location on server.
C:\Digital_Sign_Tomcat\webapps\file-upload\WEB-INF\classes\license
This Topic is created by shahzadlatif using Email to Topic tool.
1 Like
@rkrawa0018 ,
We investigated your reported issue on the remote server. We couldn’t reproduce the issue. License we successfully applied.
Hi,
License is working in your code written by you on clients machine but not in mine i have checked it. I tried various codes from google but no able to fix this issue and can not provide sample app for issue reproduce. Please fix it asap.
for reference i used below link.
Good morning,
we tried to use the license file (Java). Unfortunately, the application works in demo mode only.
Code:
public class SimpleGroupDocsTest {
public static void main(String[] args) {
System.out.println(“SimpleGroupDocs started :)”);
SimpleGroupDocsTest simpleGroupDocs = new SimpleGroupDocsTest();
simpleGroupDocs.setLicense();
}
private void setLicense() {
try {
License license = new License();
System.out.p…
Thanks,
Ritesh
1 Like
@rkrawa0018 ,
rkrawa0018:
but not in mine
Please share your machine/computer remote access in private message. We’ll see what is wrong there.
rkrawa0018:
Please fix it asap
We’ll first investigate the root of issue and then share outcomes. We tried to reproduce license issue on your client’s remote server but license is working well there.
Which time may I share my machine for issue fixing?
@rkrawa0018 ,
You can share remote access of your machine anytime in private message. And we will start investigation. Please note that mostly issues are investigated on first come first served basis.
Okay, I will share my machine.
1 Like