AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

Last post 01-04-2012, 10:36 AM by daniel.manzke. 7 replies.
Sort Posts: Previous Next
  •  01-01-2012, 4:52 PM 352390

    AssertionFailure while saving PPT/PPTX to PDF in Test Sutie Java

    Attachment: Present (inaccessible)
    Hi,

    at the moment I'm evaluating your license. I managed to convert a PPT and PPTX to PDF in a Standalone Java Program.
    I have than put the code into my testsuites. (using TestNG)

    The test for rendering is not able to render the same files. I have attached the code. Do you have any "assert check != true" (or something similar) in your code?
    With this I'm not able to test our products with the rendering feature.

    Any idea?

    [TestNG] Running:
      C:\Users\dam\AppData\Local\Temp\testng-eclipse-817819333\testng-customsuite.xml

    FAILED: renderToPDF
    java.lang.AssertionError
    at com.aspose.slides.obfuscated.bic.do(SourceFile:87)
    at com.aspose.slides.obfuscated.ge.do(SourceFile:79)
    at com.aspose.slides.obfuscated.kp.<init>(SourceFile:29)
    at com.aspose.slides.obfuscated.jo.do(SourceFile:249)
    at com.aspose.slides.obfuscated.jo.<init>(SourceFile:57)
    at com.aspose.slides.obfuscated.lf.<init>(SourceFile:41)
    at com.aspose.slides.obfuscated.aky.do(SourceFile:82)
    at com.aspose.slides.pptx.PresentationEx.save(SourceFile:2614)
    at com.aspose.slides.pptx.PresentationEx.save(SourceFile:2538)
    at com.saperion.connector.renditions.tests.StrangeRenderTest.renderToPDF(StrangeRenderTest.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:691)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:753)
    at org.testng.TestRunner.run(TestRunner.java:613)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
    at org.testng.SuiteRunner.run(SuiteRunner.java:241)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
    at org.testng.TestNG.run(TestNG.java:1006)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)


    ===============================================
        Default test
        Tests run: 1, Failures: 1, Skips: 0
    Filed under: java;pdF;ppt;pptx
     
  •  01-01-2012, 5:29 PM 352391 in reply to 352390

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Some steps further. I forced Eclipse to disable all assertions. (JVM Parameters: -da -dsa)
    Now the test is "dying" with:

    java.lang.ExceptionInInitializerError
    at com.aspose.slides.obfuscated.ji.<init>(SourceFile:20)
    at com.aspose.slides.obfuscated.jo.do(SourceFile:252)
    at com.aspose.slides.obfuscated.jo.<init>(SourceFile:57)
    at com.aspose.slides.obfuscated.lf.<init>(SourceFile:41)
    at com.aspose.slides.obfuscated.aky.do(SourceFile:82)
    at com.aspose.slides.pptx.PresentationEx.save(SourceFile:2614)
    at com.aspose.slides.pptx.PresentationEx.save(SourceFile:2578)
    at com.saperion.connector.renditions.aspose.PowerPointRenderEngine$PPTXSaver.save(PowerPointRenderEngine.java:165)
    at com.saperion.connector.renditions.aspose.PowerPointRenderEngine.safeRender(PowerPointRenderEngine.java:99)
    at com.saperion.connector.renditions.RenderEngine$AbstractRenderEngine.render(RenderEngine.java:55)
    at com.saperion.connector.renditions.tests.Powerpoint2007RenderTest.renderToPDF(Powerpoint2007RenderTest.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:691)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:753)
    at org.testng.TestRunner.run(TestRunner.java:613)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
    at org.testng.SuiteRunner.run(SuiteRunner.java:241)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
    at org.testng.TestNG.run(TestNG.java:1006)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
    Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'T'
    at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:769)
    at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:576)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:501)
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:476)
    at com.aspose.slides.obfuscated.kr.<clinit>(SourceFile:67)
    ... 35 more



    This occurs, if in a static block an exception was thrown. So it seems, that you have in com.aspose.slides.obfuscated.ji some kind of:

    static{
    ...
    }

    Where you are parsing a date wrongly.
     
  •  01-02-2012, 2:26 AM 352422 in reply to 352391

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Hi,

    I have tried to observe the stack trace. Kindly share the source presentation for necessary investigation on my end.

    Many Thanks,

    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  01-02-2012, 9:25 AM 352474 in reply to 352390

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Attachment: Present (inaccessible)
    I can reproduce it with every Powerpoint, but for you I created one. :)
    Filed under: java;ppt;pptx
     
  •  01-02-2012, 10:37 PM 352522 in reply to 352474

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Attachment: Present (inaccessible)
    Hi,

    I have worked with the presentation file shared by you using the all the necessary jar files and have been able to export presentation to PDF and save as well. For your kind reference, I have shared the jar files used along with the generated PPTX and PDF. I have used the code snippets given over link 1 and link 2. Please share, if I may help you further. If the issues still persist for you then please share the detail information about your environment and complete eclipse project for further information.

    Many Thanks,

    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  01-03-2012, 10:59 AM 352781 in reply to 352522

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Attachment: Present (inaccessible)
    Here we go:

    OS: Windows 7 with 64-Bit Java (1.6_25)
    IDE: MyEclipse 64-Bit

    I have created a small Maven Project. Place your license into the /lib/slides-2.7.0 folder. There is an empty placeholder.

    Will be interesting if it is running on your system.

    Bye,
    Daniel
     
  •  01-04-2012, 8:48 AM 353007 in reply to 352781

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Hi Daniel,

    I have worked with the project code shared by you. I have observed that wen you are setting PDF compliance to PDF_A1B, the IllegalArgumentException is thrown. if you comment the following line in your code snippet for the time being, the PDF will be generated successfully.

    pdfOptions.setCompliance(com.aspose.slides.export.PdfCompliance.PDF_A1B);

    I have also observed large amount of multimedia content inside your presentation. So, please increase heap size if you get OutofMemory exception. An issue with ID 33118 has been created in our issue tracking system to further investigate and resolve the compliance issue. This thread has been linked with the issue so that you may be automatically notified once the issue is resolved.

    We are sorry for your inconvenience,

    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  01-04-2012, 10:36 AM 353035 in reply to 353007

    Re: AssertionFailure while saving PPT/PPTX to PDF in Test Sutie

    Hey,

    thanks for the "good" news. :)

    I'm happy that we have identified the bug. 

    Looking forward for the fix. ;)


    Bye and thanks,
    Daniel
     
View as RSS news feed in XML