Forum OpenACS Q&A: Response to Loading the data model incorrectly

Collapse
Posted by Daniel Katz on
I seem to be having a related problem.  Every time I start up the AOLserver, I see the following in the logs:

[17/Mar/2000:11:35:19][12535.1026][-sched-] Error: Ns_PgExec: result status: 7 message: ERROR:  ad_partner: Table does not exist.

[17/Mar/2000:11:35:19][12535.1026][-sched-] Error: nsd.tcl: Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
    while executing
"ns_db select $db "select distinct partner_cookie from ad_partner""
    invoked from within
"set sub_selection [ns_db select $db "select distinct partner_cookie from ad_partner"]..."
    invoked from within
"if { [catch {set db [ns_db gethandle subquery]} err_msg] } {
    ns_log Notice "ad-partner: Can't get db handle. Using list_of_cookies to register cookie ..."
    (procedure "ad_partner_initialize" line 7)
    invoked from within
"ad_partner_initialize"

which would seem to imply that the data model has been incorrectly loaded.  Note that I

1) have edited www/doc/sql/postgres.sql correctly for the rpm-based install of postgresql (v. 6.5.3) which I am using,

2) have downloaded and installed the latest driver from the ACS/PG site,

3) have destroyed the db and recreated it,

4) have redirected the stderr output of the load-data-model.sql load to a file to examine for errors and have found none,

5) have examined the file load-data-model.sql for the string "postgres65.sql" and have not found it, commented out or otherwise, although I did find the string "i postgres.sql" (which was uncommented), and

6) have made sure that I'm loading the data model as a postgresql superuser.

The system works to extent that I can add new users, become system and do certain administration functions, etc., but fails when (as a user) I try to access the Homepage Maintenance or Neighborhood functions, I end up with the message "Server Error :  The server encountered a configuration or operating system error while attempting to satisfy your request" and more server log entries about missing a missing users_homepages tables and failing operations due to queries not returning rows.  Again, since I can write certain information to the database (e.g., email addresses and names of users), I would guess that the data model is the problem, rather than the PostgreSQL itself.

Any suggestions?

Dan Katz