Forum OpenACS Q&A: Database operation "1row" failed

Collapse
Posted by Budi Wiyono on
Hi All,
When i 'm try login (user-login.tcl), there are database error like
bellow. I have installed openacs 234, then doing upgrade to 235. How
to fix the problem ?

registered_proc blew up --- backtrace follows: Database
operation "1row" failed (exception NSDB, "Query was not a statement
returning rows.") while executing "ns_db 1row $db [db_sql_prep $sql"
(procedure "database_to_tcl_string" line 6) invoked from
within "database_to_tcl_string $db "select user_id_sequence.nextval
from dual"" invoked from within "set user_id [database_to_tcl_string
$db "select user_id_sequence.nextval from dual"]"
(file "/var/opt/www/openacs-235/www/register/user-new.tcl" line 25)
invoked from within "source "[ns_url2file "/register/user-new.tcl"]""
invoked from within "if {$selection == ""} { # not in the database
ns_db releasehandle $db

Collapse
Posted by Jonathan Ellis on
looks like you need to change <i>select user_id_sequence.nextval from dual</i> to <i>select nextval('user_id_sequence')</i> if you are running postgres.
<br><br>
although I'm surprised that you're running into this problem.  Does openacs-235 = openacs 3.2.5?
Collapse
Posted by Dan Wickstrom on
database_to_tcl_string converts nextval statements to their correct form, so that's not the problem.  You can list all of the sequences using the ds command from psql.  Check and see if the user_id_sequence even exists in the db.  It sounds like, your data-model has not loaded correctly.
Collapse
Posted by Budi Wiyono on
It's working, now...

psql:postgres.sql:14: ERROR:  stat failed on file '/usr/local/pgsql/lib/plpgsql.so': No such file or directory

I have copied plpgsql.so to that directory.

Thanks.