Forum OpenACS Q&A: Book marks package

Collapse
Posted by Vamshi Krishna Kaniganti on
hi

can any body help me out ,

i am unable to uninstall the bookmarks package, it is giving me problem at the database side,i am using POstgresql 7.2.3 as the database, could any body sort out this problem,

thanks
vamshi

Collapse
2: Re: Book marks package (response to 1)
Posted by tammy m on
Post the error message from your server log.
Collapse
3: Re: Book marks package (response to 2)
Posted by Vamshi Krishna Kaniganti on
hi tammy
i am getting the following error

psql:bookmarks-drop.sql:62: ERROR:  index "bm_bookmarks_idx2" does not exist
psql:bookmarks-drop.sql:78: ERROR:  RemoveFunction: function 'bookmark__new(varchar, varchar, varchar, text, text, int4, varchar, int4)' does not exist

    invoked from within
"db_source_sql_file -callback apm_doc_body_callback "[acs_package_root_dir $package_key]/$path""
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $code_block "
    ("1" arm line 1)
    invoked from within
"switch $errno {
        0 {
            # TCL_OK
        }
        1 {
            # TCL_ERROR
            global errorInfo errorCode
            error $error $errorInfo $errorCode
        }
        2 {
    ..."
    ("while" body line 20)
    invoked from within
"while { [db_getrow $db $selection] } {
        incr counter
        if { [info exists array_val] } {
        unset array_val
        }
        if { ![info exists column..."
    ("uplevel" body line 5)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
    set selection [db_exec select $db $full_statement_name $sql]

    set counter 0
    while { [db_getrow $db $selection] } {
        incr co..."
    (procedure "db_foreach" line 35)
    invoked from within
"db_foreach drop_file_query "
    select path from apm_package_files
    where file_id in ([join $sql_drop_scripts \",\"])
        and file_type='data_model_..."
    invoked from within
"if {![empty_string_p $sql_drop_scripts]} {

    doc_body_append "Now executing drop scripts.
<ul>
"
    db_foreach drop_file_query "
    select path ..."
    ("uplevel" body line 28)
    invoked from within
"uplevel {
          ad_page_contract {

    Deletes a package from the database and the filesystem.

    @author Bryan Quinn (mailto:bquinn@arsdigita.com)
    @..."
    (procedure "code::tcl::/home/kmcaol/web/performix/packages/acs-admin/www..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    $handler
      } ad_script_abort val {
    # do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    rp_serve_abstract_file "$root/$path"
    set tcl_url2file([ad_conn url]) [ad_conn file]
    set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

this was the error i am getting when i am uninstalling the book marks
thankyou
vamshi

Collapse
4: Re: Book marks package (response to 1)
Posted by Jade Rubick on
It looks like it may have partially uninstalled. Perhaps the uninstall script is not robust enough to detect if portions have already been uninstalled.

What I would recommend doing is this:

1) make sure it is not uninstalled.

2) try manually loading the data model in again, and then uninstalling it. You can manually load the data model by going into the sql/ directory of the package and using psql or sqlplus to load in the data model. Load the create script. Then try uninstalling again.

3) If that doesn't work, I would post a bug in the Bugtracker.

Hope that helps. I know this is frustrating, but you're going to learn a lot about this all works in the process!

Collapse
5: Re: Book marks package (response to 1)
Posted by Peter Marklund on
Vamshi,
I just tried uninstalling Bookmarks on a clean 4.6 installation with .LRN and had no problems. What I usually do in these situations is uninstall the package in the APM with the sql drop script un-checked. The APM will then unregister the package from the system and I've never seen this fail. To remove the data structures of the package you must then step through the sql drop script and execute the statements manually in psql.

Your problems stem from a mismatch between the create script you ran when you installed the package (when was this?) and the drop script you have now. You might have updated the sources after installation and forgotten to upgrade the package in the APM. Another possibility is that the package was missing an upgrade script.

Collapse
6: Re: Book marks package (response to 5)
Posted by Vamshi Krishna Kaniganti on
Thanks Every body

i could solve out the problem by comparing the create script and the drop script, the author forgot to comment out some of the syntaxes as he is not creating them, and the parameters are mismatched.

thanks once again
cheers
vamshi

Collapse
7: Re: Book marks package (response to 1)
Posted by Jade Rubick on
Vamshi, if you could make a patch of your correction, and submit them on the bugtracker, that would help out others who face the same problem in the future.

To do a patch, you use cvs diff -u on the file.

Save it to a file, then post it on the Bugs section, as a patch for a bug you create.

:)