Forum OpenACS Development: contacts pkg installation
There are some required packages, which i already updated:
http://www.myybiz.net/file-storage/view/error2.jpg
but i always get this message:
http://www.myybiz.net/file-storage/view/error1.jpg
So I watched the installation process trough the error.log file, the error start here:
[25/Jul/2006:18:00:12][8653.8][-conn:yabtdev::4] Error: apm_package_install: Error installing Contacts version 1.2b14: psql:contacts-create.sql:17: ERROR: relation "contact_party_revisions" already exists
psql:contacts-create.sql:28: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
PL/pgSQL function "content_type__create_type" line 41 at perform
psql:contacts-create.sql:68: ERROR: relation "contact_groups" already exists
psql:contacts-create.sql:80: ERROR: relation "contact_groups_allowed_rels" already exists
psql:contacts-create.sql:96: ERROR: relation "contact_signatures" already exists
psql:contacts-create.sql:117: ERROR: relation "contact_rel_types" already exists
psql:contacts-create.sql:123: ERROR: relation "contact_rels" already exists
psql:contacts-create.sql:129: ERROR: relation "organization_rels" already exists
psql:contacts-create.sql:152: ERROR: relation "contact_deleted_history" already exists
psql:contacts-package-create.sql:125: ERROR: -20000: This folder does not allow subfolders to be created
CONTEXT: PL/pgSQL function "content_folder__new" line 7 at return
PL/pgSQL function "contact__folder_id" line 11 at assignment
psql:contacts-search-create.sql:24: ERROR: relation "contact_searches" already exists
psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
psql:contacts-search-create.sql:50: ERROR: relation "contact_search_conditions" already exists
psql:contacts-search-create.sql:64: ERROR: relation "contact_search_log" already exists
psql:contacts-search-create.sql:156: ERROR: relation "contact_extend_search_seq" already exists
psql:contacts-search-create.sql:166: ERROR: relation "contact_extend_options" already exists
psql:contacts-search-create.sql:181: ERROR: relation "contact_search_extend_map" already exists
psql:contacts-messages-create.sql:14: ERROR: relation "contact_message_types" already exists
psql:contacts-messages-create.sql:15: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:16: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:17: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:18: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:19: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:38: ERROR: relation "contact_message_items" already exists
psql:contacts-messages-create.sql:57: ERROR: relation "contact_messages" already exists
psql:contacts-messages-create.sql:82: ERROR: relation "contact_message_log" already exists
psql:contacts-messages-create.sql:97: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
psql:contacts-create.sql:17: ERROR: relation "contact_party_revisions" already exists
psql:contacts-create.sql:28: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
PL/pgSQL function "content_type__create_type" line 41 at perform
psql:contacts-create.sql:68: ERROR: relation "contact_groups" already exists
psql:contacts-create.sql:80: ERROR: relation "contact_groups_allowed_rels" already exists
psql:contacts-create.sql:96: ERROR: relation "contact_signatures" already exists
psql:contacts-create.sql:117: ERROR: relation "contact_rel_types" already exists
psql:contacts-create.sql:123: ERROR: relation "contact_rels" already exists
psql:contacts-create.sql:129: ERROR: relation "organization_rels" already exists
psql:contacts-create.sql:152: ERROR: relation "contact_deleted_history" already exists
psql:contacts-package-create.sql:125: ERROR: -20000: This folder does not allow subfolders to be created
CONTEXT: PL/pgSQL function "content_folder__new" line 7 at return
PL/pgSQL function "contact__folder_id" line 11 at assignment
psql:contacts-search-create.sql:24: ERROR: relation "contact_searches" already exists
psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
psql:contacts-search-create.sql:50: ERROR: relation "contact_search_conditions" already exists
psql:contacts-search-create.sql:64: ERROR: relation "contact_search_log" already exists
psql:contacts-search-create.sql:156: ERROR: relation "contact_extend_search_seq" already exists
psql:contacts-search-create.sql:166: ERROR: relation "contact_extend_options" already exists
psql:contacts-search-create.sql:181: ERROR: relation "contact_search_extend_map" already exists
psql:contacts-messages-create.sql:14: ERROR: relation "contact_message_types" already exists
psql:contacts-messages-create.sql:15: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:16: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:17: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:18: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:19: ERROR: duplicate key violates unique constraint "contact_message_types_pk"
psql:contacts-messages-create.sql:38: ERROR: relation "contact_message_items" already exists
psql:contacts-messages-create.sql:57: ERROR: relation "contact_messages" already exists
psql:contacts-messages-create.sql:82: ERROR: relation "contact_message_log" already exists
psql:contacts-messages-create.sql:97: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
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 "
[25/Jul/2006:18:00:12][8653.8][-conn:yabtdev::4] Error:
Failed to install Contacts, version 1.2b14. The following error was generated:
psql:contacts-create.sql:17: ERROR: relation "contact_party_revisions" already exists psql:contacts-create.sql:28: ERROR: duplicate key violates unique constraint "acs_object_types_pk" CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement PL/pgSQL function "content_type__create_type" line 41 at perform psql:contacts-create.sql:68: ERROR: relation "contact_groups" already exists psql:contacts-create.sql:80: ERROR: relation "contact_groups_allowed_rels" already exists psql:contacts-create.sql:96: ERROR: relation "contact_signatures" already exists psql:contacts-create.sql:117: ERROR: relation "contact_rel_types" already exists psql:contacts-create.sql:123: ERROR: relation "contact_rels" already exists psql:contacts-create.sql:129: ERROR: relation "organization_rels" already exists psql:contacts-create.sql:152: ERROR: relation "contact_deleted_history" already exists psql:contacts-package-create.sql:125: ERROR: -20000: This folder does not allow subfolders to be created CONTEXT: PL/pgSQL function "content_folder__new" line 7 at return PL/pgSQL function "contact__folder_id" line 11 at assignment psql:contacts-search-create.sql:24: ERROR: relation "contact_searches" already exists psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk" CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement psql:contacts-search-create.sql:50: ERROR: relation "contact_search_conditions" already exists psql:contacts-search-create.sql:64: ERROR: relation "contact_search_log" already exists psql:contacts-search-create.sql:156: ERROR: relation "contact_extend_search_seq" already exists psql:contacts-search-create.sql:166: ERROR: relation "contact_extend_options" already exists psql:contacts-search-create.sql:181: ERROR: relation "contact_search_extend_map" already exists psql:contacts-messages-create.sql:14: ERROR: relation "contact_message_types" already exists psql:contacts-messages-create.sql:15: ERROR: duplicate key violates unique constraint "contact_message_types_pk" psql:contacts-messages-create.sql:16: ERROR: duplicate key violates unique constraint "contact_message_types_pk" psql:contacts-messages-create.sql:17: ERROR: duplicate key violates unique constraint "contact_message_types_pk" psql:contacts-messages-create.sql:18: ERROR: duplicate key violates unique constraint "contact_message_types_pk" psql:contacts-messages-create.sql:19: ERROR: duplicate key violates unique constraint "contact_message_types_pk" psql:contacts-messages-create.sql:38: ERROR: relation "contact_message_items" already exists psql:contacts-messages-create.sql:57: ERROR: relation "contact_messages" already exists psql:contacts-messages-create.sql:82: ERROR: relation "contact_message_log" already exists psql:contacts-messages-create.sql:97: ERROR: duplicate key violates unique constraint "acs_object_types_pk" CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
<font color="red">NOTE:</font> If the error comes from a sql script you may try to source it manually. When you are done with that you should revisit the APM and try again but remember to leave the manually souced sql scipts unchecked on the previous page.
[25/Jul/2006:18:00:15][8653.12][-sched:25-] Notice: dbdrv: opening database 'postgres:localhost::yabtdev'
[25/Jul/2006:18:00:15][8653.12][-sched:25-] Notice: Opening yabtdev on localhost
[25/Jul/2006:18:00:15][8653.12][-sched:25-] Notice: Ns_PgOpenDb(postgres): Openned connection to localhost::yabtdev.
it seems as i was installing the pkg again, overwriting tables and relations as well. But it's possible since this is the first time i am installing this package.
Does anyone know a way out???
with the orginal source I imported the db.
(e.g: "psql -f db-backup.dmp") . then I check through psql if the tables related onthe error.log were already on the database and... they are.
public | contact_deleted_history | table | yabtdev
public | contact_extend_options | table | yabtdev
public | contact_extend_search_seq | sequence | yabtdev
public | contact_groups | table | yabtdev
public | contact_groups_allowed_rels | table | yabtdev
public | contact_message_items | table | yabtdev
public | contact_message_log | table | yabtdev
public | contact_message_types | table | yabtdev
public | contact_messages | view | yabtdev
public | contact_party_revisions | table | yabtdev
public | contact_party_revisionsi | view | yabtdev
public | contact_party_revisionsx | view | yabtdev
public | contact_rel_types | view | yabtdev
public | contact_rels | table | yabtdev
public | contact_search_conditions | table | yabtdev
public | contact_search_extend_map | table | yabtdev
public | contact_search_log | table | yabtdev
public | contact_searches | table | yabtdev
public | contact_signatures | table | yabtdev
Although how is it possible if i dont see the aplication installed on the system?
Is there another package using contact's tables?
I droped all tables related on the error, except for these two: "acs_object_type__create_type" and "organization_rels"
I don't know if they are related with another stuff on the system. Do you about it
psql:contacts-messages-create.sql:97: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
psql:contacts-create.sql:129: ERROR: relation "organization_rels" already exists
I don't know if they are related with another stuff on the system. Do you know about it?
another thing...
even if the error comes up... is the package installed??
What you can do is load the datamodel manually in psql and then install the package using the APM and *NOT* run the datamodel create scripts.
but it doesn't show the option to clear the checkbox and install the datamodel mannually.
from the screen to list the required pkg
http://www.myybiz.net/file-storage/view/error2.jpg
it goes directly to the instalation screen and get the error
http://www.myybiz.net/file-storage/view/error1.jpg
Did you do that?
The one i had is. acs-admin->install software->from local
http://www.myybiz.net:8090/acs-admin/install/install?package%5ftype=apm%5fapplication
now, it requires for acs-events>=0.5, http://www.myybiz.net/file-storage/view/error3.jpg
i already put the version from head there but it still get the error.
version name="0.5d3" url="https://openacs.org/repository/download/apm/acs-events-0.5d3.apm";
I figured there are two ways to install a new package.
1 - The one you post above
From acs-admin -> package manager -> install new package
http://www.myybiz.net:8090/acs-admin/apm/packages-install
2- The one i oftenly used on my box
From acs-admin -> install software -> install from local/install from repository
So far i installed using the 1 method and chose to install the datamodel manually. then it was just run:
psql -f contact-create.sql
and get back to the website and enable the new package i installed.
It's working fine I believe there's no risk to be loosing data, is it correct?
ps:
before I ran contact-create.sql mannually I tried the follow steps.
I ran psql -f contact-drop.sql. Just to be sure I cleaned up everything. Then i tried to install the datamodel from the browser but i got an error reference at
psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
Is there any way to track the message error to show up this info then we can delete mannually from the table the record referenced by the ID?
It seems madness but I was looking at the tables the data, but it's just impossible to know all the relations. :)
I debugged every table created by the script sql/postgresql/contacts-create.sql
the good thing is i can understand much clear what contact pkg does. Now I will have look at the procs.
I tried to track the relations created between contacts pkg and others tables on oacs. It's just impossible. I've found some and deleted. But I still get the error if i try to install the pkg form the browser
Diferent form the duplicated key error message.
psql:contacts-search-create.sql:38: ERROR: duplicate key violates unique constraint "acs_object_types_pk"
CONTEXT: PL/pgSQL function "acs_object_type__create_type" line 37 at SQL statement
I've got this peculiar error message about write permissions on the folder
psql:contacts-package-create.sql:125: ERROR: -20000: This folder does not allow subfolders to be created
CONTEXT: PL/pgSQL function "content_folder__new" line 7 at return
PL/pgSQL function "contact__folder_id" line 11 at assignment