<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Generating process image on jBPM Designer and OpenJDK7
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/cristiano.nicolai">Cristiano Nicolai</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/778788#778788">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I just run into a bug trying to generate a process image and I think this information can be useful to save some <span class="short_text" id="result_box" lang="en"><span class="hps">time if anyone have the same problem.</span></span></p><p>Here is the situation:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My environment:</p><p>Guvnor 5.5.0.Final</p><p>jBPM Designer 2.4.0.Final</p><p>OpenJDK 1.7.0_09-icedtea</p><p>EAP6</p><p>RHEL6.3</p><p><br/>Basically if you try to export a process image you get a file not found as response. However, a process image file is created on Guvnor(0 bytes). Looking at the logs you will not see much information about the error.</p><p>After some investigation I could get the following stacktrace: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>17:21:51,730 ERROR [stderr] (http-localhost/127.0.0.1:8080-23) java.lang.NullPointerException</p><p>17:21:51,730 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)</p><p>17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.SunFontManager$2.run(SunFontManager.java:432)</p><p>17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.security.AccessController.doPrivileged(Native Method)</p><p>17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.SunFontManager.<init>(SunFontManager.java:375)</p><p>17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.awt.X11FontManager.<init>(X11FontManager.java:32)</p><p>17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.reflect.Constructor.newInstance(Constructor.java:525)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.Class.newInstance0(Class.java:372)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.Class.newInstance(Class.java:325)</p><p>17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)</p><p>17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.security.AccessController.doPrivileged(Native Method)</p><p>17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)</p><p>17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.Font.getFont2D(Font.java:490)</p><p>17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.Font.canDisplay(Font.java:1947)</p><p>17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getIndexFor(FontResolver.java:98)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getFontIndex(FontResolver.java:174)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getFontIndex(FontResolver.java:181)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.nextFontRunIndex(FontResolver.java:199)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.font.TextLayout.singleFont(TextLayout.java:475)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.font.TextLayout.<init>(TextLayout.java:527)</p><p>17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.text.BidiAttributedCharacterIterator.<init>(Unknown Source)</p><p>17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.computeTextRuns(Unknown Source)</p><p>17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Unknown Source)</p><p>17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds2D(Unknown Source)</p><p>17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.TextNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)</p><p>17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)</p><p>17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)</p><p>17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D(Unknown Source)</p><p>17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering(Unknown Source)</p><p>17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.renderGNR(Unknown Source)</p><p>17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers(Unknown Source)</p><p>17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)</p><p>17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)</p><p>17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:110)</p><p>17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)</p><p>17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:155)</p><p>17:21:51,743 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.jbpm.designer.web.server.TransformerServlet.doPost(TransformerServlet.java:210)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>It turns out that this problem is related to the following OpenJDK bug: </span><a class="jive-link-external-small" href="http://bugs.sun.com/view_bug.do?bug_id=7068471" target="_blank">http://bugs.sun.com/view_bug.do?bug_id=7068471</a><span>, which is fixed only for OpenJDK8.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>To get around this problem I installed the following package dejavu-sans-fonts on RHEL6.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If you google for NullPointerException sun.awt.X11FontManager.getDefaultPlatformFont you can find many other people having similar problems.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Hope this information can be useful.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Happy process modeling! <span> ;) </span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/778788#778788">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>