Forum OpenACS Q&A: News Agregator installation error

Collapse
Posted by Ricardo Jorge on
Hi !

I am trying to install News Agregator in an OpenACS 5.2.2 + SuSE 10.1 + PostgreSQL 8.1 and the following error happen:

[02/Jun/2006:17:15:37][5110.3066026912][-conn:server0::4] Error: apm_package_install: Error installing News Aggregator version 1.0.2: psql:news-aggregator-tables-create.sql:131: ERROR: relation "na_items_item_id_seq" does not exist
psql:news-aggregator-tables-create.sql:134: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:135: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:145: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:147: ERROR: relation "na_saved_items" does not exist

psql:news-aggregator-tables-create.sql:131: ERROR: relation "na_items_item_id_seq" does not exist
psql:news-aggregator-tables-create.sql:134: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:135: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:145: ERROR: relation "na_items" does not exist
psql:news-aggregator-tables-create.sql:147: ERROR: relation "na_saved_items" does not exist

invoked from within
"db_source_sql_file -callback $callback $path/$file_path"
(procedure "apm_package_install_data_model" line 32)
invoked from within
"apm_package_install_data_model -callback $callback -data_model_files $data_model_files $spec_file_path"
invoked from within
"if { $load_data_model_p } {
apm_package_install_data_model -callback $callback -data_model_files $data_model_files $spec_file_path
..."
("uplevel" body line 53)
invoked from within
"uplevel $body "
[02/Jun/2006:17:15:37][5110.3066026912][-conn:server0::4] Error:

Failed to install News Aggregator, version 1.0.2. The following error was generated:

psql:news-aggregator-tables-create.sql:131: ERROR: relation "na_items_item_id_seq" does not existpsql:news-aggregator-tables-create.sql:134: ERROR: relation "na_items" does not exist psql:news-aggregator-tables-create.sql:135: ERROR: relation "na_items" does not exist psql:news-aggregator-tables-create.sql:145: ERROR: relation "na_items" does not exist psql:news-aggregator-tables-create.sql:147: ERROR: relation "na_saved_items" does not exist

OpenACS is working without problems in the environment mentioned above.

Any ideas how to solve the error? Thanks, Ricardo Jorge.

Collapse
Posted by Michael Steigman on
Jorge,

Where/how did you get the package (i.e., CVS checkout, repository)?

Collapse
Posted by Ricardo Jorge on
Hi Michael Steigman !

Thanks for your reply, I've installed from repository !

Collapse
Posted by Michael Steigman on
Hey Ricardo (sorry for getting your name backwards earlier). That should be working. I'm out of town for the weekend but I'll fix whatever's going on with the package on Monday. Sorry for the trouble.
Collapse
Posted by Ricardo Jorge on
Hi Michael Steigman !

I also noticed that file news-aggregator-packages-drop.sql has a typo on line 9 ( seledct instead of select ).

Thank you for your attention. Regards, Ricardo Jorge

Collapse
Posted by Michael Steigman on
Ricardo,

After looking at the sql and considering that others have installed this recently, it seems likely that the problem is an incompatibility with PG 8.1. I do not have a PG 8.1 install to test on so maybe you can help me (and others) work through the problem. The main issue appears to be that PG is barfing when trying to create na_items. Do you know how to use psql or the sql mode in emacs? If you could use either method and feed PG the 'create table na_items' statement and let me know what the result is, maybe we'll have an idea what's going. Else, maybe someone familiar with 8.1 can spot the problem area. Here's the statement:

create table na_items (
       item_id                      integer
                                    default nextval('na_items_item_id_seq')
                                    constraint na_items_pk
                                    primary key,
       source_id                    integer
                                    constraint na_items_sid_fk
                                    references na_sources(source_id)
                                    constraint na_items_sid_nn
                                    not null,
       link                         varchar(500),
       guid                         varchar(500),
       original_guid    varchar(500),
       permalink_p                  boolean
                                    default true,
       title                        varchar(500),
       author                       varchar(100),
       comment_page                 varchar(200),
       description                  text,
       content_encoded              text,
       creation_date                timestamptz
                                    default current_timestamp,
    pub_date                        timestamptz
);
Collapse
Posted by Ricardo Jorge on
Hi Michael !

I think the issue is fixed, one must move the line with "create sequence na_items_item_id_seq cache 1;" just right before the function "create table na_items". This way the sequence will be available when PostgreSQL creates the table.

My News Aggregator's installation is working now :)

Please, let me know if I can do any other test just to verify if this issue is really fixed.

Thank you for your attention. Regards, Ricardo Jorge

Collapse
Posted by Michael Steigman on
Ah... yes. Makes sense. Interesting that the sequence and table statements have been there for a long time (I haven't touched them) and nobody's run into this. Not sure how the sql is parsed but perhaps something's changed with 8.1 in that area. In any case, I moved the sequence creation up above the table creation and also fixed the typo you pointed out in the drop script :)

Thanks, Ricardo.