Free Support Forum - aspose.com

Exception we got - Viador Inc

Alexey,

Here is another exception we got, and I'm sure this one is running from only 1 thread.
Can you please take a look as soon as possoble? It's so urgent.

Our code here:
Slide slide = ppt.addEmptySlide();
slide.changeMaster(master);

Thanks,
Peng


Exception 5:

$com.aspose.slides.PptEditException: Error inserting new slide to a presentation.
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2024)
at com.viador.core.export.ppt.PPTExporter.addSlide(PPTExporter.java:559)
at com.viador.core.export.ppt.PPTExporter.export(PPTExporter.java:166)
at com.viador.core.export.PPTExportServer.export(PPTExportServer.java:18)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.aspose.slides.PptEditException: Slide cloning error.
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1372)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2013)
... 13 more
Caused by: java.io.IOException: Read wrong number of bytes from Escher record.
at com.aspose.slides.aV.do(SourceFile:52)
at com.aspose.slides.ai.do(SourceFile:23)
at com.aspose.slides.dz.do(SourceFile:31)
at com.aspose.slides.cr.do(SourceFile:73)
at com.aspose.slides.aV.do(SourceFile:49)
at com.aspose.slides.ai.do(SourceFile:23)
at com.aspose.slides.eW.do(SourceFile:35)
at com.aspose.slides.ei.(SourceFile:42)
at com.aspose.slides.eF.(SourceFile:39)
at com.aspose.slides.eW.(SourceFile:24)
at com.aspose.slides.ap.do(SourceFile:127)
at com.aspose.slides.ap.do(SourceFile:59)
at com.aspose.slides.ap.do(SourceFile:39)
at com.aspose.slides.eF.do(SourceFile:55)
at com.aspose.slides.ei.(SourceFile:42)
at com.aspose.slides.eF.(SourceFile:39)
at com.aspose.slides.ab.(SourceFile:38)
at com.aspose.slides.Slide.do(SourceFile:639)
at com.aspose.slides.Presentation.do(SourceFile:1211)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1359)
... 14 more
Slide cloning error.
com.viador.core.export.ppt.PPTExportException: Slide cloning error.
at com.viador.core.export.ppt.PPTExporter.throwException(PPTExporter.java:686)
at com.viador.core.export.ppt.PPTExporter.export(PPTExporter.java:189)
at com.viador.core.export.PPTExportServer.export(PPTExportServer.java:18)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



Alexey Zhilin wrote:
Hello Peng,

All these exceptions are very strange. Are you sure you don't
change the same presentation object from different threads?


Exception 2:
java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.aspose.slides.Slides.get(SourceFile:34)
at com.aspose.slides.Presentation.int(SourceFile:2780)
at com.aspose.slides.Presentation.do(SourceFile:2945)
at com.aspose.slides.Presentation.if(SourceFile:3180)
at com.aspose.slides.Presentation.write(SourceFile:595)
at com.viador.core.export.ppt.PPTExporter.save(PPTExporter.java:402)
at com.viador.core.export.PPTExportServer.save(PPTExportServer.java:75)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
at java.lang.Thread.run(Unknown Source)

Exception 3:
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at com.aspose.slides.Table.catch(SourceFile:2019)
at com.aspose.slides.Table.this(SourceFile:1934)
at com.aspose.slides.Rectangle.this(SourceFile:209)
at com.aspose.slides.Shape.new(SourceFile:2187)
at com.aspose.slides.Presentation.if(SourceFile:3186)
at com.aspose.slides.Presentation.write(SourceFile:595)
at com.viador.core.export.ppt.PPTExporter.save(PPTExporter.java:402)
at com.viador.core.export.PPTExportServer.save(PPTExportServer.java:75)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
at java.lang.Thread.run(Unknown Source)


Exception 4:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 260059
at com.aspose.slides.af.do(SourceFile:459)
at com.aspose.slides.af.for(SourceFile:267)
at com.aspose.slides.eF.do(SourceFile:77)
at com.aspose.slides.eF.do(SourceFile:78)
at com.aspose.slides.eF.do(SourceFile:78)
at com.aspose.slides.dB.do(SourceFile:163)
at com.aspose.slides.Presentation.char(SourceFile:768)
at com.aspose.slides.Presentation.write(SourceFile:601)



Hi, Alexey,

As I mentioned to you before, we are getting errors while saving presentation to file.
The following is the exception we got. Can you please take a look? This is
very urgent case. And let me know if you need more information.

Thanks,
Peng


Exception 1:
com.aspose.slides.PptWriteException: Error writing presentation to a stream.
at com.aspose.slides.Presentation.write(SourceFile:632)
at com.viador.core.export.ppt.PPTExporter.save(PPTExporter.java:402)
at com.viador.core.export.PPTExportServer.save(PPTExportServer.java:75)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.aspose.slides.eW.do(SourceFile:52)
at com.aspose.slides.eF.do(SourceFile:78)
at com.aspose.slides.dB.do(SourceFile:163)
at com.aspose.slides.Presentation.char(SourceFile:768)
at com.aspose.slides.Presentation.write(SourceFile:601)
... 12 more
Error writing presentation to a stream.
com.viador.core.export.ppt.PPTExportException: Error writing presentation to a s
tream.
at com.viador.core.export.ppt.PPTExporter.throwException(PPTExporter.jav
a:684)
at com.viador.core.export.ppt.PPTExporter.save(PPTExporter.java:406)
at com.viador.core.export.PPTExportServer.save(PPTExportServer.java:75)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour
ce)
at java.lang.Thread.run(Unknown Source)


This message was posted using Support 2 Forum

Dear Peng,

Are you creating presentation from scratch or you are creating presentation from existing ppt files?

If it is later case, do you get such an exception for all source ppts.

Please also show, how are you getting master which you are passing as a parameter to slide.changeMaster method?

We are creating a Presentation from scratch. We have a master ppt file on the server that we use to apply the style. Visual formats (size and style of fonts) are defined at run time.

Naveen Patlola

(Peng's Co-worker)

Answered by email.

Hi Alexey,

I got a similar exception. I am using the latest release of Aspose.Slides.


[5/28/08 15:22:46:670 IST] 00000049 SystemOut O 2008-05-28 15:22:46,667 INFO [WebContainer : 0] (PPTUtil.java:114) - Exception:
com.aspose.slides.PptWriteException: Error writing presentation to a stream.
at com.aspose.slides.Presentation.write(SourceFile:647)
at com.deluxe.pptgenerator.utils.PPTUtil.createPPT(PPTUtil.java:111)
at com.deluxe.spti.business.mrt.promotion.actions.PPTDisplayerServlet.doPost(Unknown Source)
at com.deluxe.spti.business.mrt.promotion.actions.PPTDisplayerServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1241)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:671)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1924)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:88)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1470)
Caused by: java.lang.NullPointerException
at com.aspose.slides.be.do(SourceFile(Compiled Code))
at com.aspose.slides.X.(SourceFile:43)
at com.aspose.slides.L.(SourceFile:117)
at com.aspose.slides.cO.do(SourceFile:81)
at com.aspose.slides.Presentation.write(SourceFile:640)
… 21 more
[5/28/08 15:22:46:671 IST] 00000049 SystemOut O 2008-05-28 15:22:46,671 ERROR [WebContainer : 0] (?:?) - Error Occured While Streaming:PPT_PROCESSING_ERRORcom.aspose.slides.PptWriteException: Error writing presentation to a stream.

Please let me know what might be causing this as soon as possible.

Regards,
Vipin