Announcement

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

    viewFile doesn't work anymore

    With the nightly build of 09/19/2010, the viewFile functionality doesn't work anymore in our application. (clicking on the magnify glass in the listgrid)

    We get the following error:

    DsResponse.getData().get("attm_file") returned an instance of java.io.ByteArrayInputStream when we were expecting an InputStream.

    The attm_file column is a BLOB column in a mysql database (datasource is of servertype SQL)

    Code:
    === 2010-09-21 17:08:17,452 [l0-2] INFO  SQLDriver - [builtinApplication.Attachment_viewFile, builtinApplication.null] Executing SQL query on 'Mysql': SELECT Attachment.attm_name, Attachment.attm_createdBy, Attachment.attm_file_date_created, Attachment.attm_modifiedBy, Attachment.attm_file_filesize, Attachment.attm_modifiedOn, Attachment.attm_recordPk, Attachment.attm_pk, Attachment.attm_file_filename, Attachment.attm_recordTable, Attachment.attm_file, Attachment.attm_createdOn FROM Attachment WHERE (Attachment.attm_pk='96')
    === 2010-09-21 17:08:17,453 [l0-2] INFO  DSResponse - [builtinApplication.Attachment_viewFile, builtinApplication.null] DSResponse: List with 1 items
    === 2010-09-21 17:08:17,453 [l0-2] INFO  DSResponse - [builtinApplication.Attachment_viewFile] DSResponse: Map with 10 keys
    === 2010-09-21 17:08:17,454 [l0-2] WARN  RPCManager - dsResponse.getData().get("attm_file") returned an instance of java.io.ByteArrayInputStream when we were expecting an InputStream. Can't continue.
    this is the datasource:

    Code:
    <DataSource 
    	serverType="sql"
    	dbName="Mysql"
    	tableName="Attachment"
    	ID="Attachment"
    >
    	<fields>
    		<field primaryKey="true" type="sequence" name="attm_pk" hidden="true"></field>
    		<field type="integer" name="attm_recordPk" hidden="true"></field>		
    		<field type="imageFile" name="attm_file" title="File" required="true" canFilter="false"></field>
    		<field type="text" length="100" name="attm_name" title="Name" canEdit="true" canFilter="true" export="true"></field>
    		<field type="text" length="100" name="attm_file_filename" hidden="true" title="" export="true"></field>
    		<field type="text" name="attm_recordTable" title="Table" canFilter="true" export="true"></field>		
    		<field type="integer" name="attm_file_filesize" title="Size" canEdit="false" canFilter="true" export="true"></field>		
    		<field type="date" name="attm_file_date_created" title="Date" canEdit="false" canFilter="true" export="true"></field>		
    		<field type="text" length="45" name="attm_createdBy" canEdit="false" title="Created by" export="true"></field>
    		<field type="text" length="45" name="attm_modifiedBy" hidden="true" canEdit="false" title="" export="true"></field>
    		<field type="datetime" name="attm_createdOn" canEdit="false" hidden="true" title="" export="true" ></field>
    		<field type="datetime" name="attm_modifiedOn" canEdit="false" hidden="true" title="" export="true"></field>		
    	</fields>
    Code:
                    VLayout layout = new VLayout();
    		layout.setHeight100();
    		layout.setWidth100();
    		
    		ListGrid grid = new ListGrid();
    		grid.setDataSource(DataSource.get("Attachment"));
    		grid.setAutoFetchData(true);
    		
    		layout.addMember(grid);
    		
    		layout.draw();
    url that I see failing:
    Code:
     URL: http://127.0.0.1:7001/slims/sc/IDACall/SiebenMees003.jpg?isc_rpc=1&isc_v=SC_SNAPSHOT-2010-09-19&isc_tnum=1
    dsrequest
    Code:
     criteria:{
            attm_pk:76,
            download_fieldname:"attm_file",
            download_filename:"SiebenMees003.jpg"
        },
        operationConfig:{
            dataSource:"Attachment",
            operationType:"viewFile"
        },
        appID:"builtinApplication",
        operation:"Attachment_viewFile",
        oldValues:{
            attm_pk:76,
            download_fieldname:"attm_file",
            download_filename:"SiebenMees003.jpg"
        }
    This worked fine with the nightly build of last week
    Last edited by daviddb; 21 Sep 2010, 09:59.

    #2
    I have updated this issue to give more detailed information on how to reproduce.

    Comment


      #3
      Sorry for updating this issue again but we did some more research on this (because it is a really blocking issue, none of the blobs in our databases can be opened or downloaded anymore)

      We more precisely investigated when it went wrong and we found out that in the nightly builds of smartgwt 2.3 power edition:

      - it worked in the build of september 5th and before
      - it does not work in the build of september 14th and after

      (we did not download every build but this should hopefully give you some information)

      (and we need the nightly build of september 19th because of other issues that were fixed in it)

      Comment


        #4
        This was an unfortunate side effect of trying to accept more data formats for streaming and has been fixed - grab the next nightly.

        Comment


          #5
          The last nightly poweredtion build I see is from 2010-09-20, I guess that is not the one with the fix?
          Any idea why there is no 2010-09-21 build?

          Comment

          Working...
          X