Hello,
I’m using Aspose Java components to extract built-in dates from Office and PDF documents when they’re uploaded into Documentum. Everything works fine except PowerPoint2007 documents. The following fragment causes the problem:
byte[] content = …;
…
ByteArrayInputStream stream = new ByteArrayInputStream(content);
com.aspose.slides.pptx.PresentationEx ppt = new com.aspose.slides.pptx.PresentationEx(stream);
com.aspose.slides.pptx.DocumentPropertiesEx builtIn = ppt.getDocumentProperties();
Date date = builtIn.getCreatedTime();
…
When being executed under Documentum, it results in the following error:
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.aspose.slides.pptx.PresentationEx.(SourceFile:1743)
at com.iv.asposeutil.AsposePropertyParser.getPowerPoint2007Properties(AsposePropertyParser.java:544)
at com.iv.asposeutil.AsposePropertyParser.getPowerPointProperties(AsposePropertyParser.java:415)
Caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.sl.do(SourceFile:39)
at com.aspose.slides.obfuscated.lj.(SourceFile:128)
at com.aspose.slides.obfuscated.lj.(SourceFile:116)
at com.aspose.slides.obfuscated.hs.(SourceFile:258)
at com.aspose.slides.obfuscated.hs.(SourceFile:218)
at com.aspose.slides.obfuscated.zr.for(SourceFile:943)
at com.aspose.slides.obfuscated.kw.(SourceFile:121)
… 24 more
java.lang.NullPointerException
at com.aspose.slides.obfuscated.sl.do(SourceFile:39)
at com.aspose.slides.obfuscated.lj.(SourceFile:128)
at com.aspose.slides.obfuscated.lj.(SourceFile:116)
at com.aspose.slides.obfuscated.hs.(SourceFile:258)
at com.aspose.slides.obfuscated.hs.(SourceFile:218)
at com.aspose.slides.obfuscated.zr.for(SourceFile:943)
at com.aspose.slides.obfuscated.kw.(SourceFile:121)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.aspose.slides.pptx.PresentationEx.(SourceFile:1743)
…
Important notes:
- The same code works perfectly well being executed in a console Java App.
- Other document formats are supported by similar code and all of them work well in Documentum.
- I’m using aspose.slides_2.3.0_20100710.jar with aspose-metafiles-1.6.1-20100110.jar, and fresh versions of jai_codec.jar and jai_core.jar.
- when testing in the console Java App, I used exactly the same set of JAR files as used in Documentum.
- The byte array in all cases contained valid document.
Can you please help me with the problem? At least, please confirm or disprove my guess about the ClassLoader.
Thanks!