Forum OpenACS Development: Re: XoWiki 0.32

Collapse
21: Re: XoWiki 0.32 (response to 19)
Posted by Matthew Burke on
Wasn't sure this was worth a new thread:

I've been trying to upgrade XoWiki and have had an afternoon of no luck.

I'm running OpenACS 5.2.3b2 with XoTcl 1.4.0 and Postgresql 7.4.x. Starting from a brand new install, I grabbed the XoTcl Core 0.41 apm and the Xowiki 0.32 apm, installed them and get the following error when I go to /xowiki for the first time.

I nuked every thing and tried previous versions of xotcl-core and xowiki and got an error that looked like a mal-formed SQL statement when trying to create the package.

Any thoughts?

Thanks,

Matt

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: insert or update on table "acs_objects" violates foreign key constraint "acs_objects_package_id_fk"
DETAIL: Key (package_id)=(0) is not present in table "apm_packages".

SQL: select content_item__new('::741',741,null,null,null,'506',null,null, 'content_item','::xowiki::Object',null,NULL,NULL, NULL,null,null,null,'f','text', 0)
while executing
"ns_pg_bind 0or1row nsdb0 { select content_item__new(:name,741,null,null,null,:creation_user,null,null, 'content_item',:object_type,null,:description,:..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "db_string" line 8)
invoked from within
"db_string insert_item " select content_item__new(:name,$parent_id,null,null,null,:creation_user,null,null, 'content_item',:object_type,null,:descripti..."
invoked from within
"set item_id [db_string insert_item " select content_item__new(:name,$parent_id,null,null,null,:creation_user,null,null, 'content_item',:object_type,nu..."
("uplevel" body line 5)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 1)
invoked from within
"db_transaction {
$__class instvar storage_type object_type
$__class folder_type -folder_id $parent_id register
db_dml lock_objects "..."
(procedure "save_new" line 23)
invoked from within
"next"
(procedure "save_new" line 3)
::741 ::Generic::CrCache::Item->save_new
invoked from within
"::$folder_id save_new"
(procedure "require_folder_object" line 34)
::734 ::xowiki::Package->require_folder_object
invoked from within
"my require_folder_object"
(procedure "init" line 7)
::734 ::xowiki::Package->init
::xowiki::Package ::xotcl::Class->create
invoked from within
"::xowiki::Package create ::$package_id -folder_id $folder_id"
invoked from within
"set Package [::xowiki::Package create ::$package_id -folder_id $folder_id]"
(file "/usr/local/www/bitdojo.org-dev/packages/xowiki/www/index.vuh" line 15)
invoked from within
"source [ad_conn file]"
(procedure "rp_handle_tcl_request" line 3)
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..."

Collapse
22: Re: Re: XoWiki 0.32 (response to 21)
Posted by Gustaf Neumann on
Mathew,

xowiki 0.33, available since sunday fixes the problem you are mentioning. it is not a malformed SQL, but a 0 valued package_id. The last line of my announcement of 0.33 references the problem you are observing with 0.32.

Collapse
23: Re: Re: Re: XoWiki 0.32 (response to 22)
Posted by Matthew Burke on
Gustaf,

Thanks! -- as I embarassedly write on the blackboard 100 times "I will make sure to _thoroughly_ read threads before posting"

Collapse
24: Installing XoWiki 0.33 (response to 23)
Posted by Matthew Burke on
Ok, not so fast.... :)

I grabbed the head (made sure it was 0.33). Dropped the database, installed from scratch again. Reread this whole thread (cross my fingers I'm not overlooking anything obvious) and installed XoWiki. I get the following:

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

SQL: insert into xowiki_objecti (item_id,revision_id,creation_user,title,description,mime_type,nls_language,text,page_title,creator) values ('744','745','506','::743',NULL,NULL,NULL,'# this is the payload of the folder object

set index_page "en:index"
',NULL,NULL)
while executing
"ns_pg_bind 0or1row nsdb0 {insert into xowiki_objecti (item_id,revision_id,creation_user,title,description,mime_type,nls_language,text,page_title,creat..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)

I've snipped the error listing.

Matt

Collapse
Posted by Stan Kaufman on
Matthew, did you get xotcl-core from HEAD, too? I'm guessing not. Make sure you're using xotcl-core 0.41 with xowiki 0.33. I've just installed without errors both on an otherwise vanilla oacs-5-2 checkout.
Collapse
Posted by Gustaf Neumann on
Matt, can it be that you the xotcl-core 0.41 between
Sat Aug 5 20:38:24 2006 UTC and
Sat Aug 5 20:39:28 2006 UTC?

xotcl-core checks, whether oacs 5.3.0d2 or newer is installed and chooses the appropriate database-operation, unless it is stated differently, as on my notebook.

For 1 minute an 4 seconds, a incorrect version was in cvs:
http://cvs.openacs.org/cvs/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl?r1=1.21&r2=1.22

maybe an update solves the problem....

Speaking of hardware, the new Mac Pros presented just now at WWDC sound like great machines for OpenACS (4 cores...)

Collapse
Posted by Matthew Burke on
I don't think I grabbed it during the unlicky four minutes, but I tried grabbing head again, and did a clean install and it works. Well, it works more than before, but still not quite. I get the following error now when I edit pages or attempt to create new pages.

wrong # args: should be "ns_cache names cache"
while executing
"ns_cache names xowiki_cache link-*-$folder_id"
(procedure "update_references" line 17)
::xowiki::f1 ::xowiki::WikiForm->update_references
invoked from within
"my update_references"
(procedure "new_data" line 7)
::xowiki::f1 ::xowiki::WikiForm->new_data
invoked from within
"::xowiki::f1 new_data"
invoked from within
"set item_id [::xowiki::f1 new_data]"
("uplevel" body line 1)
invoked from within

Next thoughts? I've got the latest AOLserver FreeBSD package so I'm not convinced it's an obsolete nscache module, but I don't have any other ideas.

Matt

Collapse
Posted by Gustaf Neumann on
This looks like an easy problem. get a recent version of ns_cache. nscache has the syntax

ns_cache names cachename ?pattern?

since a couple of ... years (?). Get a recent version of nscache

cvs -z3 -d:pserver:mailto:anonymous@aolserver.cvs.sourceforge.net:/cvsroot/aolserver co nscache

seems, as if xowiki exercises some oacs componens more than other packages....

-gustaf