Forum .LRN Q&A: LORSM Package problem

Collapse
Posted by Rafael Chacon on
Hello, I'm trying to use the lorms package and I'm having troubles when trying to see any of the metadata information. For instance when I try to view Metada MD the following error appears:

Take me back where I was (before the error)

invalid command name " || entry_l || "
while executing
"" || entry_l || ""
invoked from within
"subst -nobackslashes {
select catalog, "[" || entry_l || "]" || " " || entry_s as entry_ls
from ims_md_metadata_cata
..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list subst -nobackslashes $sql]"
(procedure "db_exec" line 17)
invoked from within
"db_exec select $db $full_statement_name $sql"
invoked from within
"set selection [db_exec select $db $full_statement_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 select $db $full_statement_name $sql]
set local_counter 0

# ..."
("uplevel" body line 6)
invoked from within
"uplevel 1 {
if { !$append_p || ![info exists counter]} {
set counter 0
}

db_with_handle -dbn $dbn db {
..."
(procedure "db_multirow_helper" line 2)
invoked from within
"db_multirow_helper"
(procedure "db_multirow" line 68)
invoked from within
"db_multirow d_md_cata select_md_cata {}"
("uplevel" body line 23)
invoked from within
"uplevel {
ad_page_contract {
Displays/Adds IMS Metadata Metametadata

@author Ernie Ghiglione (mailto:ErnieG@ee.usyd.edu.au)
@creation-date 30 Ja..."
(procedure "code::tcl::/var/lib/aolserver/mdotlrn2.5/packages/lorsm/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"
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)
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/[ad_conn extra_url]""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/[ad_conn extra_url]"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl..."

I've been trying to debug the code but I don't get what is happening.

Thanks in advanced for your help.

Collapse
2: Re: LORSM Package problem (response to 1)
Posted by Dave Bauer on
The square brackets [ and ] need to be escaped as \[ \] in that string that is sent to the subst procedure.
Collapse
3: Re: LORSM Package problem (response to 1)
Posted by Rafael Chacon on
Uh thanks. Sorry but I made a mistake in the last post. The actual error that I'm having is:

invalid command name "'"
while executing
"' || entry_l || '"
invoked from within
"subst -nobackslashes {
select catalog, '[' || entry_l || ']' || ' ' || entry_s as entry_ls
from ims_md_metadata_cata
..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list subst -nobackslashes $sql]"
(procedure "db_exec" line 17)
invoked from within
"db_exec select $db $full_statement_name $sql"
invoked from within
"set selection [db_exec select $db $full_statement_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 select $db $full_statement_name $sql]
set local_counter 0

# ..."
("uplevel" body line 6)
invoked from within
"uplevel 1 {
if { !$append_p || ![info exists counter]} {
set counter 0
}

db_with_handle -dbn $dbn db {
..."
(procedure "db_multirow_helper" line 2)
invoked from within
"db_multirow_helper"
(procedure "db_multirow" line 68)
invoked from within
"db_multirow d_md_cata select_md_cata {}"
("uplevel" body line 22)
invoked from within
"uplevel {
ad_page_contract {
Displays/Adds IMS Metadata Metametadata

@author Ernie Ghiglione (mailto:ErnieG@ee.usyd.edu.au)
@creation-date 30 Ja..."
(procedure "code::tcl::/var/lib/aolserver/mdotlrn2.5/packages/lorsm/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"
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)
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/[ad_conn extra_url]""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/[ad_conn extra_url]"
set tcl_url2file([ad_conn url]) [ad_conn file]

Thanks for your help
set tcl..."