Forum OpenACS Development: Datamodel loading fails

Collapse
Posted by Jarkko Laine on
Loading data model when installing openacs (from head) dies with the following errors:
[14/Feb/2003:17:37:30][16352.5126][-conn0-] Error: Error sourcing /web/pargasif/packages/acs-bootstrap-installer/installer/install-data-model.tcl:
psql:postgresql.sql:291: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:310: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:329: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:348: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:701: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:752: ERROR:  Function 'tree_ancestor_keys(varbit, int4)' does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts
psql:postgresql.sql:798: ERROR:  SearchSysCache: Bad cache id 27
psql:postgresql.sql:835: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-metadata-create.sql:345: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-objects-create.sql:156: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-relationships-create.sql:299: ERROR:  SearchSysCache: Bad cache id 27
psql:community-core-create.sql:237: ERROR:  SearchSysCache: Bad cache id 27
psql:community-core-create.sql:432: ERROR:  SearchSysCache: Bad cache id 27
psql:community-core-create.sql:576: ERROR:  SearchSysCache: Bad cache id 27
psql:community-core-create.sql:667: ERROR:  SearchSysCache: Bad cache id 27
psql:groups-create.sql:125: ERROR:  SearchSysCache: Bad cache id 27
psql:groups-create.sql:409: ERROR:  gtr_group_type_fk referential integrity violation - key referenced from group_type_rels not found in acs_object_types
psql:groups-create.sql:414: ERROR:  gtr_group_type_fk referential integrity violation - key referenced from group_type_rels not found in acs_object_types
psql:rel-segments-create.sql:42: ERROR:  SearchSysCache: Bad cache id 27
psql:rel-constraints-create.sql:39: ERROR:  SearchSysCache: Bad cache id 27
psql:groups-body-create.sql:432: ERROR:  SearchSysCache: Bad cache id 27
psql:groups-body-create.sql:648: ERROR:  SearchSysCache: Bad cache id 27
psql:groups-body-create.sql:869: ERROR:  SearchSysCache: Bad cache id 27
psql:journal-create.sql:35: ERROR:  SearchSysCache: Bad cache id 27
psql:site-nodes-create.sql:30: ERROR:  SearchSysCache: Bad cache id 27
psql:site-nodes-create.sql:206: ERROR:  SearchSysCache: Bad cache id 27
psql:site-node-object-map-create.sql:23: ERROR:  SearchSysCache: Bad cache id 27
psql:site-node-object-map-create.sql:43: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:97: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:209: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:651: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:757: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:1036: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:1113: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:1190: ERROR:  SearchSysCache: Bad cache id 27
psql:apm-create.sql:1220: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:162: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:175: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:258: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:303: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:314: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create.sql:319: ERROR:  acs_magic_objects_object_id_fk referential integrity violation - key referenced from acs_magic_objects not found in acs_objects
psql:acs-create-2.sql:16: ERROR:  SearchSysCache: Bad cache id 27
psql:acs-create-2.sql:17: ERROR:  SearchSysCache: Bad cache id 27

    invoked from within
"db_source_sql_file -callback apm_ns_write_callback "acs-kernel-create.sql""
    (file "/web/pargasif/packages/acs-bootstrap-installer/installer/install-data-model.tcl" line 31)
    invoked from within
"source $__file "

Collapse
Posted by Peter Marklund on
This is not an OpenACS problem but a PostgreSQL configuration issue. I had the same problem but unfortunately I don't remember exactly how I ended up solving it. However, if you search with google using that error message you'll get quite a lot of useful information. One of the texts say that the problem is "caused by trying to load a 7.1 plpgsql.so into 7.2.". It could be you need to setup LD_LIBRARY_PATH to point to PG_HOME/lib.
Collapse
Posted by Lars Pind on
... or, more likely, you (or probably I) used the wrong (i.e. 7.1) createlang binary when creating plpgsql for your database.

I'll email you the details. Sorry.

(Others: Jarkko is hosting his site on our server)

/Lars

Collapse
Posted by Jarkko Laine on
Peter and Lars,

I did both set the LD_... variable for me and installed the db with correct executables. I think it's the LD_LIBRARY_PATH for nsadmin that matters, though?

Now the data model installation goes almost well. In fact the page says "Done installing the OpenACS kernel data model." , but doesn't give the button to move on.

There still seems to be some problems with caching, since the following in the error log:

[16/Feb/2003:19:59:27][5266.5126][-conn0-] Error: Error sourcing /web/pargasif/pac\
kages/acs-bootstrap-installer/installer/install-data-model.tcl:
no such cache: util_memoize
    while executing
"ns_cache flush util_memoize $script"
    (procedure "util_memoize_flush" line 2)
    invoked from within
"util_memoize_flush [list apm_package_installed_p_not_cached $package_key]"
    (procedure "apm_package_install" line 8)
    invoked from within
"apm_package_install -callback apm_ns_write_callback "[file join [acs_root_dir] pa\
ckages acs-kernel acs-kernel.info]""
    invoked from within
"apm_version_enable -callback apm_ns_write_callback [apm_package_install -callback\
 apm_ns_write_callback "[file join [acs_root_dir] packages acs-kernel..."
    (file "/web/pargasif/packages/acs-bootstrap-installer/installer/install-data-m\
odel.tcl" line 63)
    invoked from within
"source $__file "

I'll go on google searching w/ the initial error, like you told me, Peter.

Collapse
Posted by Peter Marklund on
Jarkko,
the util_memoize problem is a bug that I introduced on cvs HEAD last week and fixed yesterday. If you cvs update all the kernel packages you should be fine.

/Peter