Opened 17 years ago

Closed 17 years ago

#5 closed defect (fixed)

Setup on Postgresql fails with type error

Reported by: anonymous Owned by: ticheler
Priority: major Milestone:
Component: GAST Version:
Keywords: Setup, Postgresql Cc:

Description

When using Gast Setup to create the database on Postgres, the process stops with this error: Error: Column "operationid" is type interger but expression is of type character varying.

M$ Windows XP Postgresql 8.2

Attachments (1)

error.png (3.0 KB ) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (7)

by anonymous, 17 years ago

Attachment: error.png added

comment:1 by joeri.theelen@…, 17 years ago

Resolution: worksforme
Status: newclosed

Solution: in class "org.fao.gast.lib.DatabaseLib", method "setupTemplatePriv(Dbms, int)" should be like this:

private void setupTemplatePriv(Dbms dbms, int id) throws SQLException
{
    String query = "INSERT INTO OperationAllowed(groupId, metadataId, operationId) VALUES(?, ?, ?)";
    dbms.execute(query, 1, id, new Integer(AccessManager.OPER_VIEW));
}

Constant "AccessManager.OPER_VIEW" really is a String value and must be converted to an Integer explicitely before executing the query.

comment:2 by anonymous, 17 years ago

Cc: painting added
Component: GASTWeb Site (Developer)
Keywords: painting added; Setup Postgresql removed
Milestone: v2.1 RC2
Priority: majorcritical
Summary: Setup on Postgresql fails with type errorpainting

comment:3 by anonymous, 17 years ago

Component: Web Site (Developer)Web Site (Community)
Keywords: wine added; painting removed
Priority: criticalmajor
Summary: paintingwine
Type: defectenhancement
Version: 2.1 beta 3

comment:4 by ticheler, 17 years ago

Cc: painting removed
Component: Web Site (Community)GAST
Keywords: Setup Postgresql added; wine removed
Milestone: v2.1 RC2
Summary: wineSetup on Postgresql fails with type error
Type: enhancementdefect
Version: 2.1 beta 3

comment:5 by brian, 17 years ago

Resolution: worksforme
Status: closedreopened

Can this issue be reopened?

This issue still exists, latest build (655) has this error.

comment:6 by acarboni, 17 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.