Free Support Forum - aspose.com

Initialising PPTX file throws exception

We are using ColdFusion alongside the .NET slides DLL to convert PPT and PPTX files to images.
We are using Aspose.Slides 4.3.0.0 on Windows Server 2008 and calling the DLL from ColdFusion.

This works well for most files, but sometimes we experience exceptions when intialising the file (in effect we are calling the Aspose.Slides.Pptx.PresentationEx constructor) passing a file reference like so:

<cfset presentation.init(“C:\path\file.pptx”)>

As I said, this works well for most files. The error we are getting for some files is as follows:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:166)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:80)
at coldfusion.runtime.dotnet.DotNetProxy.invoke(DotNetProxy.java:38)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfpptx2ecfm1646641663.runPage(C:\inetpub\wwwroot\sharemyslides.com\website\api\temp\pptx.cfm:7)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:360)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: Aspose.Slides.Pptx.PptxUnsupportedFormatException: Not a Microsoft PowerPoint 2007 presentation. —> Aspose.Slides.Pptx.PptxReadException: Error reading “/ppt/handoutMasters/handoutMaster1.xml” xml part —> System.Xml.Schema.XmlSchemaValidationException: The element ‘ext’ in namespace ‘http://schemas.openxmlformats.org/drawingml/2006/main’ has incomplete content. List of possible elements expected: ‘##any:*’.
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(ValidationEventHandler eventHandler, Object sender, XmlSchemaValidationException e, XmlSeverityType severity)
at System.Xml.Schema.XsdValidator.ValidateEndElement()
at System.Xml.XmlValidatingReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at nh.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
— End of inner exception stack trace —
at nh.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
at nh.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2)
at nh.a()
at nh…ctor(Stream A_0)
— End of inner exception stack trace —
at nh…ctor(Stream A_0)
at Aspose.Slides.Pptx.PresentationEx…ctor(String file)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.jnbridge.jnbcore.DotNetObjectBase.a(Unknown Source)
at com.jnbridge.jnbcore.ExceptionFactory.throwException(Unknown Source)
at Aspose.Slides.Pptx.PresentationEx.()
… 40 more


I am attaching one of the problematic files. Are you able to reproduce the problem? Note that the error does not occur when we try to convert via slide.GetThumbnail() but as soon as we try to instantiate the file.

Regards,

Stefan




Some input would be appreciated.

Hi Stefan,

I am sorry for the delayed response. I would first suggest that you must Aspsoe.Slides for .NET 5.3.0 first with your application. Its the latest available release. If you still found issues then please share the working code sample with us for which you have been obtaining the issue. Please share your feedback with us if the issue still persists.

Thanks and Regards,