Forum .LRN Q&A: Re: LAMS2 and .LRN integration (beta) released!

Collapse
Posted by Rob Mayhue on
Hi Ernie,

I have installed LAMS on a separate server and installed the dotlrn LAMS packages in a new dotlrn 2.3.1 install and configured the parmaters. After adding the LAMS Integration into a class the folder list shows up fine and I can create a lesson using the author and save it but when I try to add a saved LAMS lesson from the folder list I get the following error from dotlrn:

error "no element found" at line 1 character 0
while executing
"dom parse $xml"
invoked from within
"set doc [dom parse $xml]"
("uplevel" body line 46)
invoked from within
"uplevel {
# packages/lams2int/www/admin/add-2.tcl

ad_page_contract {

Creates a new instance of LAMS sequence and adds a new lesson to a cour..."
(procedure "code::tcl::/var/lib/aolserver/service0a/packages/lams2int/ww..." 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 5)
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..."

I added 'ns_log notice $xml' to add-2.tcl and it seems that the $xml variable is an empty string.

Any ideas?

Thank you.

Collapse
Posted by Ernie Ghiglione on
Hi Rob,

I have added this to our bug tracker. Currently I'm on the road, but we'll be back in the office next week. I'll post more here as I get to this.

Thanks,

Ernie

Collapse
Posted by Ernie Ghiglione on
Hi Rob,

I've been trying to reproduce this error, but haven't been able to do so.

Is this error showing consistently? Does it occur with only one sequence or with any that you choose?

Thanks,

Ernie

Collapse
Posted by Rob Mayhue on
Hi Ernie,

Sorry it took so long to get back to you. Thanks for looking into this.

I installed the dotlrn LAMS packages into a new dotLRN 2.3.0 install and got the same error that I got in the dotLRN 2.3.1 install. The $xml variable is an empty string.

I added some ns_log statements to add.tcl & add-2.tcl to help debug things. The call to [ad_httpget -url $lesson_url -timeout 30] in add-2.tcl is returning "page {} status 505 modified {}". Any idea way this might be happening?

Here is the slightly modified $lesson_url being passed into ad_httpget "http://xxx.xxx.xxx.xxx:8080/lams/services/xml/LessonManager?method=start↦serverId=dotlrn&ldId=26↦datetime=October+02%2c2007+01%3a32+PM↦hashValue=9b0713f421a8c5f691349eb5f46c6f4ec809ce11↦username=567↦courseId=2346↦title=SHFR-DEVEL TEST↦desc=Test LAMS course.↦country=AU↦lang=en"

The LAMS2 server was installed into a CentOS 4.5 server using the instructions on the LAMS site. The LAMS2 server seems to work fine on its own so I think its running properly.

Thanks,

Rob

Collapse
Posted by Ernie Ghiglione on
Hi Rob,

I've never seen a 505 error before. What version of LAMS are you running?

Would you be able to check the LAMS logs for errors as well?

See in the jboss-4.0.2/server/default/log folder the following files:

access_log
server.log

Thanks,

ernie

Collapse
Posted by Rob Mayhue on
Hi Ernie,

I'm running LAMS 2.0.4 and I couldn't find any 505 errors in any of the jboss or LAMS logs.

I did manage to solve the issue though.

I started looking at the $lession_url in add-2.tcl and noticed that '&title=$name' and '&desc=$introduction' were not being URL encoded so in the 'set lession_url "$lams_server_url/...' statment I added a 'ad_urlencode' to URL encode the vars '...&title=[ad_urlencode $name]&desc=[ad_urlencode $introduction]...' then everything worked as expected. I guess the spaces in the text of the URL was causing the 505 error.

Thanks,
Rob

Collapse
Posted by Ernie Ghiglione on
Hi Rob,

Thanks for your help on this. I'm glad that is solved.

I have made the changes to the code as you suggested and ´resolved the issue.

The latest code can be downloaded from the LAMS repository.

Thanks again Rob.

Any other comments, bugs or suggestions always welcome.

Ernie

Collapse
Posted by Jose Vega on
Hello,
I'm having this error trying to add a lams lesson:
error "mismatched tag" at line 1 character 1054
" Web/2.1.3.GA</h3><--Error-- ></html>"
    while executing
"dom parse $xml"
    ("uplevel" body line 57)
    invoked from within
"uplevel {
# packages/lams2int/www/admin/add.tcl

ad_page_contract { Adds a LAMS lesson @author Ernie Ghiglione (mailto:ErnieG@melcoe.mq.edu..."; (procedure "code::tcl::/usr/share/dotlrn/packages/lams2int/www/admin/add" line 2) invoked from within "code::tcl::$__adp_stub" ("uplevel" body line 12) 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..."

The XML response page is "HTTP Status 400 - can not retrieve user information"

You have any idea on what's happening?
Thanks.