Hello,
I would like to check my OPDK license expiration date. I found only a way that I have to send the license file to support team and ask to check. But is there any way to check by ourselves?
Thanks
Solved! Go to Solution.
Run this on OPDK where MP is installed.
import com.apigee.license.*;
import java.util.Properties;
public class PrintLicense {
public static void main(String[] args) {
LicenseServiceHelper helper = LicenseServiceHelper.getInstance();
Properties props = helper.getLicenseProperties();
System.out.println(props);
}
}
javac -cp /opt/apigee/edge-gateway/lib/infra/services/licensing-1.0.0.jar PrintLicense.java
java -Dlicense.file.location="/tmp/license.txt" -cp ".:/opt/apigee/edge-gateway/lib/infra/services/:/opt/apigee/edge-gateway/lib/thirdparty/:/opt/apigee/edge-gateway/lib/kernel/*:/opt/apigee/edge-gateway/lib/infra/services/licensing-1.0.0.jar:/opt/apigee/edge-gateway/lib/thirdparty/*" PrintLicense
Run this on OPDK where MP is installed.
import com.apigee.license.*;
import java.util.Properties;
public class PrintLicense {
public static void main(String[] args) {
LicenseServiceHelper helper = LicenseServiceHelper.getInstance();
Properties props = helper.getLicenseProperties();
System.out.println(props);
}
}
javac -cp /opt/apigee/edge-gateway/lib/infra/services/licensing-1.0.0.jar PrintLicense.java
java -Dlicense.file.location="/tmp/license.txt" -cp ".:/opt/apigee/edge-gateway/lib/infra/services/:/opt/apigee/edge-gateway/lib/thirdparty/:/opt/apigee/edge-gateway/lib/kernel/*:/opt/apigee/edge-gateway/lib/infra/services/licensing-1.0.0.jar:/opt/apigee/edge-gateway/lib/thirdparty/*" PrintLicense
Thank you so much
Hi,
I have tried and I get the following error:
10:34:18.653 [main] ERROR SERVICE.LICENSE - License file corrupted
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:159)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2813)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2829)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3306)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:933)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:395)
at com.apigee.license.crypto.CryptoUtilsImpl.readPrivateKeyFromFile(CryptoUtilsImpl.java:92)
at com.apigee.license.crypto.CryptoUtilsImpl.decrypt(CryptoUtilsImpl.java:70)
at com.apigee.license.LicenseServiceHelper.loadLicense(LicenseServiceHelper.java:176)
at com.apigee.license.LicenseServiceHelper.<init>(LicenseServiceHelper.java:47)
at com.apigee.license.LicenseServiceHelper.<clinit>(LicenseServiceHelper.java:43)
at PrintLicense.main(PrintLicense.java:8)
The license file is a plain text file. Do I have to copy the license in a specific format?
Thank you