Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #1951 (closed)

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

BUG: exception after a single row is added to a recreated table

Reported by: bwzloranger Owned by: jamoore
Priority: n.a. Milestone: OMERO-Beta4.2
Component: n.a. Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2010-03-05 (4)

Description

Creating a single 'row' of data in a new table will throw an exception once you try to read the data. For example:

    // Creates a number of empty rows of [rows] size for the base history table
    private Column[] createBaseColumns(int rows) {
        Column[] newColumns = new Column[3];
        newColumns[BASE_UID_COLUMN] = new LongColumn("Uid", "", new long[]{1});
        newColumns[BASE_DATETIME_COLUMN] = new LongColumn("DateTime", "", new long[]{1});
        newColumns[BASE_STATUS_COLUMN] = new StringColumn("Status", "", 100, new String[]{"c"});
        return newColumns;
    }

will throw an error when trying to do:

    public Data getBaseTableData() throws ServerError
    {
     	
        	long rows = baseTable.getNumberOfRows();
        	System.err.println("Number of rows in base Table: " + rows);
        	long[] ColNumbers = {BASE_UID_COLUMN, BASE_DATETIME_COLUMN, BASE_STATUS_COLUMN};
            Data d = baseTable.read(ColNumbers, 0L, rows);
            return d;
    }

Sample test file included illustrates this problem.

Attachments (1)

TableStringExample.java (6.3 KB) - added by bwzloranger 14 years ago.

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by bwzloranger

comment:1 Changed 14 years ago by jmoore

  • Remaining Time set to 0.25
  • Status changed from new to assigned

comment:2 Changed 14 years ago by jmoore

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6226]) fix #1951 - another workaround for fromrows

comment:3 Changed 14 years ago by jmoore

(In [6596]) fix #2159 - Moving to tolist() for all column types (see #1951, #2160)

comment:4 Changed 13 years ago by jmoore <josh@…>

(In [841f8e4ea13cd7a766991be568927beaf0902157/ome.git] on branch dev_4_1_custom) fix #1951 - another workaround for fromrows

git-svn-id: file:///home/svn/omero/trunk@6226 05709c45-44f0-0310-885b-81a1db45b4a6

comment:5 Changed 13 years ago by jmoore <josh@…>

(In [b82e2a017c2dd1f06f462eaae35b9acbbcbac3a7/ome.git] on branch dev_4_1_custom) fix #2159 - Moving to tolist() for all column types (see #1951, #2160)

git-svn-id: file:///home/svn/omero/trunk@6596 05709c45-44f0-0310-885b-81a1db45b4a6

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68106 sec.)

We're Hiring!