3 Replies Latest reply on Mar 18, 2014 10:15 PM by fbimage

    Generating process image on jBPM Designer and OpenJDK7

    Cristiano Nicolai Newbie

      Hi all,

       

      I just run into a bug trying to generate a process image and I think this information can be useful to save some time if anyone have the same problem.

      Here is the situation:

       

      My environment:

      Guvnor 5.5.0.Final

      jBPM Designer 2.4.0.Final

      OpenJDK 1.7.0_09-icedtea

      EAP6

      RHEL6.3


      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.

      After some investigation I could get the following stacktrace:

       

      17:21:51,730 ERROR [stderr] (http-localhost/127.0.0.1:8080-23) java.lang.NullPointerException

      17:21:51,730 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)

      17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.SunFontManager$2.run(SunFontManager.java:432)

      17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.security.AccessController.doPrivileged(Native Method)

      17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.SunFontManager.<init>(SunFontManager.java:375)

      17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.awt.X11FontManager.<init>(X11FontManager.java:32)

      17:21:51,731 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.Class.newInstance0(Class.java:372)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.lang.Class.newInstance(Class.java:325)

      17:21:51,732 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)

      17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.security.AccessController.doPrivileged(Native Method)

      17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)

      17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.Font.getFont2D(Font.java:490)

      17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.Font.canDisplay(Font.java:1947)

      17:21:51,733 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getIndexFor(FontResolver.java:98)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getFontIndex(FontResolver.java:174)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.getFontIndex(FontResolver.java:181)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at sun.font.FontResolver.nextFontRunIndex(FontResolver.java:199)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.font.TextLayout.singleFont(TextLayout.java:475)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at java.awt.font.TextLayout.<init>(TextLayout.java:527)

      17:21:51,734 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.text.BidiAttributedCharacterIterator.<init>(Unknown Source)

      17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.computeTextRuns(Unknown Source)

      17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Unknown Source)

      17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds2D(Unknown Source)

      17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.TextNode.getPrimitiveBounds(Unknown Source)

      17:21:51,735 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,736 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,737 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,738 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,739 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown Source)

      17:21:51,740 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)

      17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)

      17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D(Unknown Source)

      17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering(Unknown Source)

      17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.renderGNR(Unknown Source)

      17:21:51,741 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers(Unknown Source)

      17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)

      17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)

      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)

      17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)

      17:21:51,742 ERROR [stderr] (http-localhost/127.0.0.1:8080-23)     at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:155)

      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)

       

      It turns out that this problem is related to the following OpenJDK bug: http://bugs.sun.com/view_bug.do?bug_id=7068471, which is fixed only for OpenJDK8.

       

      To get around this problem I installed the following package dejavu-sans-fonts on RHEL6.

       

      If you google for NullPointerException sun.awt.X11FontManager.getDefaultPlatformFont you can find many other people having similar problems.

       

      Hope this information can be useful.

       

      Happy process modeling!