• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 1.1
    • 1.0
    • Page - Export / Import
    • Using tomcat 5.0.18 under Linux 2.4.20 (Redhat) running on a virtually hosted box. JDK 1.4.03 from Sun.

      I am unable to export anything to PDF due to X windows not being installed on the server, this is a common configuration on most hosted servers.

      The following error presents itself in the server log:

      INFO: Invoking rollback for transaction on method 'exportAs' in class [com.atlassian.confluence.importexport.ImportExportManager] due to throwable [java.lang.UnsatisfiedLinkError: /opt/j2sdk1.4.2_02/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory]

      I am unfamiliar with how the PDF export is generated, but is there a way to eliminate the use of awt? This would most likely fix it.

            [CONFSERVER-970] Unable to export to PDF on Linux server VM

            Sulka Haro added a comment -

            If you set "java.awt.headless" to the JVM (start the JVM with -Djava.awt.headless=true) all AWT calls with work without requiring X11. This was one of the Big Things that came out with Java 1.4. See http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless

            Also note that setting the property after starting the JVM won't work. You have to include the setting in the Confluence startup shell script.

            Sulka Haro added a comment - If you set "java.awt.headless" to the JVM (start the JVM with -Djava.awt.headless=true) all AWT calls with work without requiring X11. This was one of the Big Things that came out with Java 1.4. See http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless Also note that setting the property after starting the JVM won't work. You have to include the setting in the Confluence startup shell script.

            I guess the 'java.awt.headless' comes in when you're gonna launch a GUI or so on such boxes. But in the current case, while there is no AWT library installed at all, I don't believe that it will work...

            Pelle, is it possible for you to install the AWT library on your box? Seems to be the only safe way to play.

            Armond Avanes added a comment - I guess the 'java.awt.headless' comes in when you're gonna launch a GUI or so on such boxes. But in the current case, while there is no AWT library installed at all, I don't believe that it will work... Pelle, is it possible for you to install the AWT library on your box? Seems to be the only safe way to play.

            You can convince the AWT graphics stuff to work on a Linux box that does not have X Window running by supplying the following system property to the JVM on startup: -Djava.awt.headless=true

            Unfortunately, I'm not sure whether this works on a box that doesn't have any X libraries at all. It's possible you'd have to install at least the xlib package (but not the X server or clients) for Java's graphical stuff to work.

            Will investigate further.

            Charles Miller (Inactive) added a comment - You can convince the AWT graphics stuff to work on a Linux box that does not have X Window running by supplying the following system property to the JVM on startup: -Djava.awt.headless=true Unfortunately, I'm not sure whether this works on a box that doesn't have any X libraries at all. It's possible you'd have to install at least the xlib package (but not the X server or clients) for Java's graphical stuff to work. Will investigate further.

            It makes sense for using AWT on image/graphic manipulation... But does it mean that there are no server side image manipulation support on this platform?! hrm....

            Armond Avanes added a comment - It makes sense for using AWT on image/graphic manipulation... But does it mean that there are no server side image manipulation support on this platform?! hrm....

            A lot of the low-level image/graphics manipulation stuff in Java goes through AWT, which leans heavily on the X11 libraries. It's very hard to avoid, unfortunately.

            Charles Miller (Inactive) added a comment - A lot of the low-level image/graphics manipulation stuff in Java goes through AWT, which leans heavily on the X11 libraries. It's very hard to avoid, unfortunately.

            Hrm... kinda odd for me! PDF generation process is a fully server side component using Apache FOP. From logical point of view, it shouldn't make use of any client side libraries (such as AWT) as we're only generating PDF and nothing more. Of course it does have a PDF viewer too which uses AWT and so but it's just another story and something rich client specific, and here it shouldn't get refered.

            Will try to track down the problem more...

            Armond Avanes added a comment - Hrm... kinda odd for me! PDF generation process is a fully server side component using Apache FOP. From logical point of view, it shouldn't make use of any client side libraries (such as AWT) as we're only generating PDF and nothing more. Of course it does have a PDF viewer too which uses AWT and so but it's just another story and something rich client specific, and here it shouldn't get refered. Will try to track down the problem more...

              0e1d1dcfc133 Armond Avanes
              0ffcdc25ae15 Pelle Braendgaard
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: