Forum OpenACS Q&A: Installation breaking on Oracle 8.1.7

Hello Community,

    I'm having a problem with installing the latest checkout of OpenACS. I downloaded the tarball and tried too, getting the same problem. Is there a mistake on my side, or is it a bug? After the installation starts, here's the error message I get:

[04/Apr/2004:15:02:41][1491.5126][-conn:voacs5::2] Notice: Populating apm_package_db_types
[04/Apr/2004:15:02:41][1491.5126][-conn:voacs5::2] Notice: GETTING OFFSET
[04/Apr/2004:15:02:41][1491.5126][-conn:voacs5::2] Notice: 183, 29
[04/Apr/2004:15:02:41][1491.5126][-conn:voacs5::2] Error: nsoracle.c:1302:OracleSelect: error in `OCIStmtExecute ()': ORA-01461: can bind a LONG value only for insert into a LONG column

SQL:
                insert into !>>>!apm_package_db_types
                    (db_type_key, pretty_db_name)
                values
                    (:db_type, :db_pretty_name)

[04/Apr/2004:15:02:41][1491.5126][-conn:voacs5::2] Error: Error sourcing /web/vamsee/voacs5/packages/acs-bootstrap-installer/installer/install.tcl:
nsoracle.c:1302:OracleSelect: error in `OCIStmtExecute ()': ORA-01461: can bind a LONG value only for insert into a LONG column

SQL:
                insert into !>>>!apm_package_db_types
                    (db_type_key, pretty_db_name)
                values
                    (:db_type, :db_pretty_name)

    while executing
"ns_ora dml nsdb0 {
                insert into apm_package_db_types
                    (db_type_key, pretty_db_name)
                values
        ..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_ora $type $db $sql] $args"
    ("oracle" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
      ..."
    invoked from within
"db_exec dml nsdb0 dbqd.acs-bootstrap-installer.installer.install_do_data_model_install.insert_apm_db_type {
                insert into apm_package_db..."
    ("eval" body line 1)
    invoked from within
"eval [list db_exec $command $db $full_statement_name $sql] $lob_argv"
    invoked from within
"if { $lob_argc == 1 } {
                # Bind :1, :2, ..., :n as LOBs (where n = [llength $lob_argv])
                set bind_vars [list]
          ..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
            if { $lob_argc == 1 } {
                # Bind :1, :2, ..., :n as LOBs (where n = [llength $lob_argv])
    ..."
    (procedure "db_dml" line 56)
    invoked from within
"db_dml insert_apm_db_type {
                insert into apm_package_db_types
                    (db_type_key, pretty_db_name)
                values
..."
    (procedure "install_do_data_model_install" line 24)
    invoked from within
"install_do_data_model_install"
    invoked from within
"if { ![install_good_data_model_p] } {
    install_do_data_model_install
} else {
    ns_write "Kernel data model already installed."
    # If kernel i..."
    (file "/web/vamsee/voacs5/packages/acs-bootstrap-installer/installer/install.tcl" line 37)
    invoked from within
"source $__file "

Help Please!

Thanks,
Vamsee.

Collapse
Posted by Tom Ayles on

Someone I was helping with an install hit exactly the same problem this week, on 8.1.7 and I believe 9.2.0 also. This error often indicates a driver/DB problem of sorts... the problem went away after they switched to using the 2.7 release of the nsoracle driver (available as a tarball from the AOLServer sourceforge page), instead of the version built from latest code obtained via CVS. So, has anyone else come across this? Does this mean that the current version of nsoracle is broken with OpenACS?!?

Collapse
Posted by Bart Teeuwisse on
Tom,

I have observed the same behavior of nsoracle CVS HEAD. Version 2.7 is stable though.

/Bart

Collapse
Posted by Don Baccus on
Someone in AOLserverland has been working on improving the Oracle driver, would one of you take the initiative to post this problem to the AOLserver list?  (I'm flying to Heidelberg tomorrow and will be busy tomorrow AM and incommunicado until Friday AM once I leave)
Collapse
Posted by Don Baccus on
What I'm trying to say is to inform folks that recent improvements seem to have broken functionality ...
Collapse
Posted by Tom Jackson on

Okay, I sent off a message. I remember the discussion where someone was happy to make 'improvements'. I thought we mentioned they shouldn't break anything along the way.

Collapse
Posted by Andrew Piskorski on
To be fair, I vaguely remember that discussion too, and some of the changes he planned would be useful. And since a big part of what he was also volunteering for was to just plain clean up and maintain the code (which many including Rob Mayoff have described as ugly and nasty), it is probably in our interest to encourage rather than discourage his efforts.

Also, agreeing not to release any broken code is not quite the same thing as promising to never ever commit anything which might have bugs. But looks like his last commit was 2004/02/15, more than two months ago, so yeah, that does seem like rather too long a time to leave egregiously broken code (which is what the errors above indicate, right?) sitting unfixed on the CVS head.

Collapse
Posted by Tom Jackson on

He wrote me privately, and his anticipated changes are in the changelog. After reading that, and noting that ScottG released 2.7 the same day as the changes started, seems like everything is okay. I'm sure it is frustrating for those who had to track this down, but it looks like things could be reversed if the work doesn't get finished. Maybe a note in the install guide to try 2.7 until further notice?

Collapse
Posted by Jeremy Collins on
Can somebody post an example of how to reproduce this?  I cannot make this happen on my system.  Well, I'm not exactly trying to install OpenACS, hopefully there is an easier way to reproduce this.
Collapse
Posted by Tom Ayles on

Jeremy,
I didn't personally experience the problem so I can't offer exact steps to reproduce it, but when I was trying to troubleshoot it, I checked the software versions they were using. They got AOLserver code using the following, not sure what the exact date would have been, but some time in the last month for sure:

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co -r aolserver_v40_r2 aolserver
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nspostgres
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nscache
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nssha1
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsoracle
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsxml

And were running Oracle Client: 8.1.7.0, Oracle Server: 8.1.7.4.1, tcl: 8.4.6. The failure occurs trying to insert data into a table with spec below:

SQL> desc apm_package_db_types;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 DB_TYPE_KEY                               NOT NULL VARCHAR2(50)
 PRETTY_DB_NAME                            NOT NULL VARCHAR2(200)

And the actual data in the table when installed successfully is:

SQL> select * from apm_package_db_types;

DB_TYPE_KEY
--------------------------------------------------
PRETTY_DB_NAME
--------------------------------------------------------------------------------
oracle
Oracle8

postgresql
PostgreSQL

Hopefully the stack trace above should give you other information you need to reproduce it.

HTH,
Tom

Collapse
Posted by Jeremy Collins on
I was able to reproduce it by creating that table and trying to insert a db_pretty_name with a string length of >4000 characters.  But this breaks both the old and new driver.  But they said that is works fine with 2.7.  I'll try installing OpenACS and see if I can reproduce it and go from there.
Collapse
Posted by Tom Jackson on

Looking at the original error, is maybe the lob code being activated for this table, which probably doesn't have a lob column? The error says Oracle can only bind a long value for insert into a long column. Maybe a switch is messed up in the installer?