Forum OpenACS Development: Re: Re: dotlrn chat

10: Re: Re: dotlrn chat (response to 6)
Posted by Rodrigo Proença on

I replace a java chat server with Gustaf Neumann xowiki ajax chat (now requires xotcl-core). This is a simple hack of xowiki code, we made an exercise to test the ajax scripts but it can be useful

look at the modified version in the file-storage. features:
-two user interfaces: ajax cliet with auto-refresh and simple HTML version to work on any browsers;
-log messages on db to make transcriptions;
-.lrn integration adding applets and portlets to clubs/class portals.

Comments, suggestions?

Posted by Emmanuelle Raffenne on
Hi Rodrigo:

I've installed chat-ajax and xotcl-core. I'm using dotlrn on openacs 5.2.2 (at localhost:8000). When I go to AJAX chat I receive a "file not found" and in the error log:

Error: error flushing "sock19": connection refused
error flushing "sock19": connection refused
while executing
"flush $w"
(procedure "chat_receive_from_server" line 11)
invoked from within
"chat_receive_from_server 8200"

I revise my hosts.allow/deny in case, port 8200 is not filtered.

Any idea?

Posted by Rodrigo Proença on
Hi Emmanuelle,

Thank you for the interest and sorry for the bug. I leave old archives with JAVA SERVER references in this release. After make a fresh install using dotlrn 2.2 tarball to test i can reporduce your error and clean some code to remove this references.

I sent new version on same folder to replace to older.

After intall chat applet and xotcl-core i receive this error message when I enter in a room

::template::login: unable to dispatch method 'chat_id' during '::template::login chat_id'
::template::login ::xotcl::Object->configure
::chat::Chat ::xotcl::Class->create
::chat::Chat ::xotcl::Class->unknown
invoked from within

To solve this, just add this lines to /packages/acs-bootstrap-installer/bootstrap.tcl

# LARS: Load packages/acs-automated-testing/tcl/aa-test-procs.tcl
ns_log Notice "Loading acs-automated-testing specially so other packages can define tests..."
apm_bootstrap_load_libraries -procs acs-automated-testing

+# GN: Should be loaded before user packages such they can use
+ # the xotcl infrastructure
+ if {[file isdirectory $root_directory/packages/xotcl-core]} {
+ apm_bootstrap_load_libraries -procs xotcl-core
+ }

13: Re: dotlrn chat (response to 12)
Posted by Gustaf Neumann on
Please note, that when you install xotcl-core, you need two patches in addition to xotcl-core as described in

cd /tmp

cd .../packages
patch -p 0 < /tmp/acs-api-documentation-procs.patch
patch -p 0 < /tmp/acs-bootstrap-installer.patch

Actually, i think these patches do no harm even when xotcl is not installed. As TIPed, they will be in oacs 5.3 anyhow. Would anyone object when i would add these patches to oacs 5.2 and commit these changes?

14: Re: dotlrn chat (response to 12)
Posted by Emmanuelle Raffenne on

Thanks for the fix. I downloaded the new version, with it the connexion error disappear but I still had the "file not found". I edited tcl/chat-ajax-procs.tcl and remove the leading path:

--- chat-ajax-procs.tcl.OLD 2006-03-03 20:58:23.000000000 +0100
+++ chat-ajax-procs.tcl 2006-03-03 20:59:54.000000000 +0100
@@ -124,10 +124,10 @@
set file [open [acs_root_dir]/$path]; set js [read $file]; close $file
set location [util_current_location]
set path [site_node::get_url_from_object_id -object_id $package_id]
- set login_url $path/ajax/chat?m=login&$context
- set send_url $path/ajax/chat?m=add_msg&$context&msg=
- set get_update "chatSendCmd(\"$path/ajax/chat?m=get_new&$context\",chatReceiver)"
- set get_all "chatSendCmd(\"$path/ajax/chat?m=get_all&$context\",chatReceiver)"
+ set login_url ajax/chat?m=login&$context
+ set send_url ajax/chat?m=add_msg&$context&msg=
+ set get_update "chatSendCmd(\"ajax/chat?m=get_new&$context\",chatReceiver)"
+ set get_all "chatSendCmd(\"ajax/chat?m=get_all&$context\",chatReceiver)"
return "\
&lt;script type='text/javascript' language='javascript'&gt;

and it works fine now.