Announcement

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

    Export to PDF does not complete

    SmartClient Version: v8.3p_2013-03-20/Pro Deployment (built 2013-03-20)

    IE 9

    No messages logged on server
    No response in Developer console

    I'm trying to export the contents of a ListGrid to a PDF file.

    Relevant code:
    Code:
                      DSRequest dsRequestProperties = new DSRequest();
                      dsRequestProperties.setExportDisplay(
                            ExportDisplay.DOWNLOAD );
                      dsRequestProperties.setDownloadResult( true );
                      dsRequestProperties.setDownloadToNewWindow( true );
                      dsRequestProperties.setSkinName( "EnterpriseBlue" );
                      dsRequestProperties.setExportFilename( "export" );
                      com.smartgwt.client.rpc.RPCManager.exportContent( grid,
                            dsRequestProperties );
    The grid variable references a populated ListGrid.

    Two things happen when the button that launches this code is clicked:
    1. The ListGrid is cleared of all data.
    2. A new browser tab opens with a tiny text box containing the following message:

    //isc_RPCResponseStart-->[{status:-1,data:"IOException on parsing style seet from a Reader; don't know the URI."}]//isc_RPCResponseEnd

    Developer console shows this from RPCManager:
    Code:
    14:03:22.561:TMR0:DEBUG:RPCManager:Using ActiveX XMLHttpRequest via constructor: MSXML2.XMLHTTP
    14:03:22.583:TMR0:INFO:RPCManager:sendQueue[2]: 1 RPCRequest(s); transport: hiddenFrame; target: http://localhost:8080/fcoe/fcoe/sc/IDACall/export?isc_rpc=1&isc_v=v8.3p_2013-03-20&isc_tnum=2
    14:03:22.619:TMR0:INFO:RPCManager:Sending data via frame isc_HiddenFrame_1 to server at URL: http://localhost:8080/fcoe/fcoe/sc/IDACall/export?isc_rpc=1&isc_v=v8.3p_2013-03-20&isc_tnum=2
    Any help you can provide would be appreciated.

    #2
    For any server-side issue, post the complete server-side log for the failing request.

    Comment


      #3
      There were no messages posted to the server logs during this request.

      Comment


        #4
        We're not sure what that means. We need the server log to help analyze the issue.

        Comment


          #5
          A closer look at all logs (not just the server console log) shows the following in the localhost_access_log.2013-03-20.txt log:
          Code:
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:40:59 -0400] "GET /fcoe/fcoe/images/pdf1_Down.png HTTP/1.1" 304 -
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:40:59 -0400] "GET /fcoe/fcoe/images/pdf1.png HTTP/1.1" 304 -
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:40:59 -0400] "GET /fcoe/fcoe/sc/system/reference/skin/images/server_client_exchange.png HTTP/1.1" 404 949
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:41:00 -0400] "POST /fcoe/fcoe/sc/IDACall/export?isc_rpc=1&isc_v=v8.3p_2013-03-20&isc_tnum=2 HTTP/1.1" 200 652
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:41:00 -0400] "GET /fcoe/fcoe/sc/system/reference/skin/images/server_client_exchange.png HTTP/1.1" 404 949
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:41:01 -0400] "POST /fcoe/fcoe/sc/IDACall/export?isc_rpc=1&isc_v=v8.3p_2013-03-20&isc_tnum=3 HTTP/1.1" 200 652
          0:0:0:0:0:0:0:1 - - [20/Mar/2013:14:41:01 -0400] "GET /fcoe/fcoe/sc/system/reference/skin/images/server_client_exchange.png HTTP/1.1" 404 949

          Comment


            #6
            This isn't the server log we're talking about. This is an HTTP log from your webserver.

            If you just follow the default instructions for installing SmartGWT, you get very rich log4j-based logging information, controlled by log4j.isc.config.xml.

            You cannot begin to troubleshoot any server-side problem without these logs. If you've suppressed them somehow, you'll need to recover this information before we can help you (actually, before anyone can).

            Comment


              #7
              The Isomorphic logging was set to "ERROR" as this application was in a production environment. Adding the PDF function is an enhancement to that application. I did some additional testing including:
              1. Built the BuiltInDS sample application and added an export to PDF button. This export worked.
              2. Changed the logging-level for Isomorphic logging to "INFO". This showed an exception when trying to find the skin's stye sheet.
              3. Noticed the lib-iTextAlternate directory in the SmartGWT pro distribution. Replaced the two libraries for the deployed application and now the export is working.
              There are some additional warning/error messages in the log however.

              The code executed this time was this:
              Code:
                               DSRequest dsRequestProperties = new DSRequest();
                                dsRequestProperties.setExportDisplay(
                                      ExportDisplay.DOWNLOAD );
                                dsRequestProperties.setExportFilename( fileName );
                                com.smartgwt.client.rpc.RPCManager.exportContent( grid,
                                      dsRequestProperties );
              Attached Files

              Comment


                #8
                Be sure not to try to add new features to a live production environment!

                This last warning is normal. It indicates that a browser dropped the connection to the server mid-download - basically an end user decided he didn't need a PDF after all and navigated away.

                Comment


                  #9
                  I suppose I should have clarified that, of course, adding features to the application is taking place in a development environment - not directly on the production server or software. The point was that the logging xml had been set for the production environment.

                  Comment


                    #10
                    Ah, that makes more sense.

                    Comment

                    Working...
                    X