No announcement yet.
  • Filter
  • Time
Clear All
new posts

    RPCManager.exportContent with FacetChart broken.


    There is regression with exporting charts to PDF.

    The following sample works using build SmartClient Version: v9.1p_2014-10-10/Pro Deployment (built 2014-10-10).

    The following sample does not work with build SmartClient Version: v9.1p_2014-11-09/Pro Deployment (built 2014-11-09).

    Furthermore, the following sample still does not work with build SmartClient Version: v9.1p_2015-01-27/Pro Deployment (built 2015-01-27).

            final FacetChart fc = new FacetChart();
            fc.setFacets(new Facet("somefield", ""));
            RecordList rl = new RecordList();
            Record r = new Record();
            r.setAttribute("somefield", "A");
            r.setAttribute("somevalue", 1);
            Window window = new Window();
            window.setTitle("Chart Window");
            IButton downloadPdf1 = new IButton("Download FacetChart");
            downloadPdf1.addClickHandler(new {
                public void onClick( event) {
                    DSRequest reqProps = new DSRequest();
                    reqProps.setAttribute("skinName", "Enterprise");
                    reqProps.setAttribute("pdfName", "export");
                    RPCManager.exportContent(fc, reqProps);

    Can you elaborate on what's going wrong for you?

    Providing sample code is great, but it's not actually completely sufficient on its own since the problems between these different builds could be related to installation issues or only appear in specific configurations, such that, even with sample code, we might not reproduce whatever is ailing you.


      Simply click the Download FacetChart button and you should be able to reproduce the issue.
      The request appears to be sent but nothing appears for download.


        What are you seeing in the server-side logs for this request?

        Just to reiterate: if this is a deployment or configuration issue, we may not see the same error or an error at all. So we need the usual details.


          I have attached a screenshot of what I gathered from the SmartClient Developer Console.

          I am not seeing any kind of errors in the Development Mode console, and this is the only logging I have at this point from the server.

          2015-01-28-19:05:11:619 -0500 INFO [http-bio-8080-exec-4] URL: '/xxxxx/xxxxx/sc/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0': Moz (Gecko) with Accept-Encoding header
          2015-01-28-19:05:11:625 -0500 INFO [http-bio-8080-exec-4] CharSet used: UTF-8

          The sample was rather simple, so I was hoping you could simply run it locally and determine if the issue was reproducible on your end.

          Attached Files


            It's queued to be run just in case, but it resembles, and is in fact simpler than, several automated tests that are coming up green and several samples as well. So we anticipate a "works for me" result and it's best to gather more info so that more progress can be made when this pops to the top of the queue.

            So if you have the time:

            1. is this happening for all your charts, or for any subset you can identify (perhaps only those in Windows or only Pie charts)

            2. when you see server-side processing end abruptly seeming with no exception, in the JVM seemingly stuff in an infinite loop (ie do you see it soaking up CPU time with no other requests going on)


              I have adjusted my log level for the server and found there is some kind of missing library dependency.

              2015-01-29-08:59:39:265 -0500  DEBUG [qtp384403810-34] Invocation threw exception
              java.lang.NoClassDefFoundError: org/apache/batik/bridge/UserAgent
              	at com.isomorphic.contentexport.PdfExport.convertSvgImages(
              	at com.isomorphic.contentexport.PdfExport.convertAllSvgOccurrencesToBase64(
              	at com.isomorphic.contentexport.PdfExport.getPdfRenderer(
              	at com.isomorphic.contentexport.PdfExport.getPdfObject(
              	at com.isomorphic.rpc.BuiltinRPC.getPdfObject(
              Caused by: java.lang.ClassNotFoundException: org.apache.batik.bridge.UserAgent
              	at java.lang.ClassLoader.findClass(
              	at java.lang.ClassLoader.loadClass(
              	at java.lang.ClassLoader.loadClass(
              	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
              	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
              	... 53 more
              I am surprised that a java.lang.NoClassDefFoundError would be logged on DEBUG rather than ERROR.

              I am wondering if a dependency changed between these builds that we don't have in our deployment. Looks like we need batik-bridge.jar with the later builds?

              Last edited by stonebranch2; 29 Jan 2015, 07:56. Reason: Added more of the stack trace.


                I had a look at and the requirements seem to imply that the batik* libraries should only be required for IE6-8, however, my issues are with FF and Chrome.
                (I verified and IE8 did indeed require those batik* libraries with the SmartClient Version: v9.1p_2014-10-10/Pro Deployment (built 2014-10-10))

                Image Export, IE6-8 DrawPane PDF Export - These libraries are required to use RPCManager.exportImage() or if DrawPanes or FacetCharts are to be exported in IE6-8:
                       batik-anim, batik-awt-util, batik-bridge, batik-css, batik-dom, batik-ext, batik-gvt, batik-parser, batik-script, batik-svg-dom, batik-util, batik-xml, xml-apis-ext
                Additionally, to be able to export images or DrawPanes and FacetCharts in IE6-8, the following libraries are needed:
                  - Batik: batik-anim, batik-awt-util, batik-bridge, batik-css, batik-dom, batik-ext, batik-gvt, batik-parser, batik-script, batik-svg-dom, batik-util, batik-xml: Apache License, Version 2.0
                  - xml-commons External Components: xml-apis-ext: W3C Software Notice and License
                Last edited by stonebranch2; 29 Jan 2015, 08:20. Reason: Fixed note about IE8 and build SmartClient Version: v9.1p_2014-10-10/Pro Deployment (built 2014-10-10)


                  We have added the batik* libraries to our deployment and the newer builds now work.

                  Seems like a code change in the later builds made the batik* libraries a requirement whereas they were not previously.


                    To summarize:

                    It appears that with build "v9.1p_2014-10-10/Pro Deployment (built 2014-10-10)", only IE6-8 had a dependency on the batik* libraries.

                    Now, with "v9.1p_2014-11-09/Pro Deployment (built 2014-11-09)" and later builds, the dependency for the batik* libraries would appear to apply for both Firefox and Chrome, which seems to be inconsistent with


                      Hi Isomorphic,
                      Will you be following up with this case soon?
                      Last edited by stonebranch2; 2 Feb 2015, 04:33.


                        Yes, this will still be looked at, it's just no longer a functional issue per se (and the issue is well reported) so it got demoted in severity.