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

Free Support Forum - aspose.com

Exception"Cannot inherit from final class" while generating PPT using Aspose.Slides for Java

Hi

I am using

  1. jdk-10.0.2 64 bit
  2. aspose.slides-8.0.0.jar
  3. windows 10 and Mac Mojave

Getting following error

java.lang.VerifyError: Cannot inherit from final class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at com.aspose.slides.pf4dd765c.pbdb106a0.pa2137a2a.ai.do(Unknown Source)
at com.aspose.slides.PresentationEx.else(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.write(Unknown Source)
at com.aspose.slides.PresentationEx.write(Unknown Source)
at org.mvp.powerpoint.PresentationCreation.loadLicense(PresentationCreation.java:61)

Please Help me on this.
Is this something related with jdk? it was running successfully on jdk 1.7 and jdk 1.8

Thanks & regards.

@rahul.kr.sharma29,

I have observed your comments. Can you please try to use Aspose.Slides latest version 19.1 on your end and if there is still an issue than please share source file so that we may further investigate to help you out.

I tries same using aspose-slides-19.1-jdk16.jar and this time it’s giving different error

I am attaching the source file for this. Please have a look.

java.lang.NoClassDefFoundError: com/aspose/slides/SlidesEx
at org.ism.mvp.view.controller.ISMPPTController.loadLicenseFile(ISMPPTController.java:254)
at org.ism.mvp.view.controller.ISMPPTController$1.run(ISMPPTController.java:129)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: com.aspose.slides.SlidesEx
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
… 3 morePresentationCreation.zip (4.1 KB)

@rahul.kr.sharma29,

I have observed your comments and like to inform that you have updated Aspose.Slides version but you have to update code snippet according to new version as well. Can you please visit this updated documentation link according to latest version. Please share feedback with us if there is still an issue.

After changing code for latest aspose-slides-19.1-jdk16.jar. I get following error:

class com.aspose.slides.exceptions.InvalidOperationException: The subscription included in this license allows free upgrades until 2014-06-03, but this version of the product was released on 2019-01-31. Please renew the subscription or use a previous version of the product.
com.aspose.slides.internal.k5.float.do(Unknown Source)
com.aspose.slides.internal.k5.float.do(Unknown Source)
com.aspose.slides.internal.k5.return.do(Unknown Source)
com.aspose.slides.internal.k5.return.do(Unknown Source)
com.aspose.slides.internal.k5.return.do(Unknown Source)
com.aspose.slides.License.setLicense(Unknown Source)
org.mvp.powerpoint.PresentationCreation.loadLicense(PresentationCreation.java:66)
org.ism.mvp.view.controller.ISMPPTController.loadLicenseFile(ISMPPTController.java:254)
org.ism.mvp.view.controller.ISMPPTController$1.run(ISMPPTController.java:129)
com.aspose.slides.internal.k5.return.do(Unknown Source)
java.base/java.lang.Thread.run(Thread.java:844)
com.aspose.slides.License.setLicense(Unknown Source)
org.mvp.powerpoint.PresentationCreation.loadLicense(PresentationCreation.java:66)
org.ism.mvp.view.controller.ISMPPTController.loadLicenseFile(ISMPPTController.java:254)
org.ism.mvp.view.controller.ISMPPTController$1.run(ISMPPTController.java:129)
at com.aspose.slides.internal.k5.float.do(Unknown Source)
java.base/java.lang.Thread.run(Thread.java:844)
at com.aspose.slides.internal.k5.return.do(Unknown Source)
Inside method of getStackTraceAsString method
at com.aspose.slides.internal.k5.return.do(Unknown Source)
at com.aspose.slides.License.setLicense(Unknown Source)
at org.mvp.powerpoint.PresentationCreation.loadLicense(PresentationCreation.java:66)
at org.ism.mvp.view.controller.ISMPPTController.loadLicenseFile(ISMPPTController.java:254)
at org.ism.mvp.view.controller.ISMPPTController$1.run(ISMPPTController.java:129)
at java.base/java.lang.Thread.run(Thread.java:844)

It Strongly Suggesting me to
Please renew the subscription or use a previous version of the product

Is aspose.slides-8.0.0.jar has some licensing issue? Because the exception with this jar is coming inside licencing Method call or it’s not supported with 64 bit JVM ? here is the previous log . Please suggest what should I do.

java.lang.VerifyError: Cannot inherit from final class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at com.aspose.slides.pf4dd765c.pbdb106a0.pa2137a2a.ai.do(Unknown Source)
at com.aspose.slides.PresentationEx.else(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.write(Unknown Source)
at com.aspose.slides.PresentationEx.write(Unknown Source)
at org.mvp.powerpoint.PresentationCreation.loadLicense(PresentationCreation.java:61)

@rahul.kr.sharma29,

I have observed your following information.

The issue is that you are trying to using the API version that has been released after the expiry date of your license. You may need to renew your subscription if you ought to you use latest version on your end. Please share, if I may help you further in this regard.

Hi Mudassir,

Thanks for your quick reply!

This message is coming when I am trying to use aspose-slides-19.1-jdk16.jar with older License.
it saying :

Please renew the subscription or use a previous version of the product.

So I think it’s saying I can use previous version which I purchased before that is aspose.slides-8.0.0.jar
But this version was giving error which was running smoothly with jdk1.7 and jdk1.8.
(Only change in product is shifting 32bit jdk to 64bit jdk)

Is that something I need 64bit jvm supported aspose.slides-8.0.0.jar and that also I need to purchase or it’s a part of OLD subscription and how can I get that?

Please clarify me.

and

If possible check on your side aspose.slides-8.0.0.jar is supported on 64bit JDK or not.

Thannks

@rahul.kr.sharma29,

I have observed your following comment.

The version (Aspose.Slides 8.0.0) that you are using is fairly old and belong to legacy API which is no longer i business since 2014. The support is offered based on latest available versions of API. If you encounter any issue using latest API, please feel free to share and discuss with us.