Free Support Forum - aspose.com

Metafiles

Hi,

I was got following error when I try to create new PresentationEx object:

java.lang.NoClassDefFoundError: com/aspose/metafiles/MetafilesException
at com.aspose.slides.obfuscated.kh.do(SourceFile:441)
at com.aspose.slides.obfuscated.nl.if(SourceFile:33)
at com.aspose.slides.obfuscated.nl.if(SourceFile:40)
at com.aspose.slides.obfuscated.nl.if(SourceFile:40)
at com.aspose.slides.obfuscated.nl.if(SourceFile:40)
at com.aspose.slides.obfuscated.nl.if(SourceFile:40)
at com.aspose.slides.obfuscated.nl.(SourceFile:17)
at com.aspose.slides.obfuscated.pu.if(SourceFile:282)
at com.aspose.slides.obfuscated.pu.(SourceFile:183)
at com.aspose.slides.pptx.PresentationEx.(SourceFile:981)
at org.gs4tr.filters.msoffice.ppt.pptx.PptxPresentationWriter.writeTest(PptxPresentationWriter.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: com.aspose.metafiles.MetafilesException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
… 31 more

I am using following line of code:

resentationEx presentation = new PresentationEx(“d:/pptx/Links.pptx”);

What cause this?

Links.pptx is attached.


Thanks,

Zeljko


Hi Zeljko,

Thanks for your interest in Aspose.Slides.

Actually, the exception is thrown due to missing Aspose.Metafiles for Java component in your project file. Please download the latest version of Aspose.Meatafiles for Java available here and add it in your project. For more information about, why Aspose.Metafiles is required in Aspose.Slides for Java, please visit here.

Thanks and Regards,