OpenJDK and Reports trouble (Fixed)

Help
2010-07-26
2013-02-18
  • Niels van Reijmersdal

    I installed T-Plan Robot v2.0.5 on a Ubuntu 9.10 machine at work and the Reports where not completing correctly.

    Problems i ran into:
    - Reports stays in Running mode. Doesn't Switch to failed nor completed at the end/exit of the script.
    - Currentstate.jpg is 0 bytes at all times.

    Console gave the following error:
    Exception in thread "AWT-EventQueue-0" java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected at com.tplan.robot.scripting.commands.impl.ScreenshotCommand.saveJPEG(ScreenshotCommand.java:486)

    I tried version v2.0.4 in my own environment and it worked, so i downgraded the new machine to v2.0.4, but it still had the same problems.

    Seems i was using OpenJDK:
    java version "1.6.0_0"
    OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
    OpenJDK Server VM (build 14.0-b16, mixed mode)

    After i upgraded to the Sun/Oracle Java everything was working again:
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

    Solution: Install Sun/Oracle Java version

    Posting this for others that might have trouble with Reports while using this version of OpenJDK.

     
  • Robert Pes

    Robert Pes - 2010-07-26

    Robot uses the class com.sun.image.codec.jpeg.JPEGImageEncoder to save JPEG images with user defined quality (based on a value in user preferences). This is not possible with the standard ImageIO class.

    As JPEGImageEncoder is undocumented and Sun internal; there's unfortunately no guarantee of a stable API. That is what happens in case of OpenJDK where the compatibility was broken. This affects not only reports but also any Screenshot command saving a JPEG.

    I'll handle it as a bug and fix it in the code. If this error is detected, I will make it to default to the standard ImageIO class and save the JPEG without the option to apply custom JPEG quality.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks