While parsing the document on linux server is giving me the below exception. Any help is greatly appreciated and thanks in advance.
JRE: 1.6
Tomcat: 1.7
Code :
byte[] documentBytes = // retrieve the bytes from a external source...
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new ByteArrayInputStream(documentBytes));
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
java.security.AccessController.doPrivileged(Native Method)
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:186)
java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
sun.awt.X11.XToolkit.<clinit>(XToolkit.java:122)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:186)
java.awt.Toolkit$2.run(Toolkit.java:870)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:862)
org.apache.xmlgraphics.image.loader.impl.DefaultImageContext.<init>(DefaultImageContext.java:42)
org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.<clinit>(BinaryPartAbstractImage.java:126)
org.docx4j.openpackaging.contenttype.ContentTypeManager.newPartForContentType(ContentTypeManager.java:379)
org.docx4j.openpackaging.contenttype.ContentTypeManager.getPart(ContentTypeManager.java:286)
org.docx4j.openpackaging.io.LoadFromZipNG.getRawPart(LoadFromZipNG.java:521)
org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:429)
org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:352)
org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:451)
org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:352)
org.docx4j.openpackaging.io.LoadFromZipNG.getPart(LoadFromZipNG.java:451)
org.docx4j.openpackaging.io.LoadFromZipNG.addPartsFromRelationships(LoadFromZipNG.java:352)
org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:245)
org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:193)
org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:301)
org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:245)
org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:213)
org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:184)