[GeoNetwork-users] gast: database setup: INSERT error

Hi,

I'm trying to install Geonetwork 2.6.3. The "Database Setup" action fails when data is being inserted. Specifically, it says that the INSERT has more expressions than target columns.

I've looked at the log of the PostgreSQL database and it shows that the process fails when it launches the following sentence:

INSERT INTO Languages VALUES ('en','English', 'eng')

This is wrong because the table "Languages" only has two fields: "id" and "name".

Any help?

Regrads,

Robert.

Hi,
I have the same problem with gast when i want to create a *database 'Postgis'* (it's work normally for a postgresql database).
The script '*create-db-postgis.sql*' is bad and create just 2 columns in the table Languages. The file is at geonetworkpath/web/geonetwork/WEB-INF/classes/setup/sql/create. You must replace the create Languages definition like this :

        -- Commenté Alain Benard car manque une colonne
        -- CREATE TABLE Languages
        -- (
        -- id varchar(5),
        -- name varchar(32) not null,
        --
        -- primary key(id)
        -- );
        CREATE TABLE Languages
           (
             id varchar(5),
             name varchar(32) not null,
             isocode varchar(3) not null,

             primary key(id)
           );

The problem disappear but a new error message come : 'Erreur : une valeur nulle viole la contrainte NOT NULL de la colonne "isocode"'.
The log posgresql is : INSERTION INTO Settings values (0,NULL,'root',NULL)
The INSERT line is correct but the create table is bad. In the same file (create-db-postgis.sql ) comment just one line like below:

        CREATE TABLE Settings
           (
             id int,
             parentId int,
             name varchar(32) not null,
        *-- Commenté Alain Benard isocode varchar(3) not null,*

             value text,

             primary key(id),

             foreign key(parentId) references Settings(id)
           );

I think a drag and drop from the developper is the orgine from the double problem. (just one line has been deplaced)
Sorry for My english.
*I hope developper's team will correct the source script*.
Have a nice day.
Alain.

Le 20:59, Robert Holland a écrit :

  Hi,

  I'm trying to install Geonetwork 2.6.3. The "Database Setup" action fails when data is being inserted. Specifically, it says that the INSERT has more expressions than target columns.

  I've looked at the log of the PostgreSQL database and it shows that the process fails when it launches the following sentence:

INSERT INTO Languages VALUES ('en','English', 'eng')

  This is wrong because the table "Languages" only has two fields: "id" and "name".

  Any help?

  Regrads,

  Robert.