Can't logon into jabber server using jabber4r

Hi,

I’m trying to connect to an internal company jabber server using jabber4r.
The server works (I’m connected to it by the Miranda client as are 15
other people). When running the first example on the jabber4r page (with
appropriate changes to server, username etc) the script hangs. By the
judicious use of puts statements I’ve found the script stops at the line:

Thread.stop

at about line 230 of jabber4r/session.rb .

This is on ruby 1.8.1 (2004-01-27) [i386-mswin32]

My script looks like this:

require ‘jabber4r/jabber4r’

begin
session = Jabber::Session.bind(‘martin@xxx.yyy.au’, ‘xxx’)
puts session
session.new_message(‘lachie@xxx.yyy.au’).set_subject(‘hello’).set_body(‘This
is jabber4r’).send
rescue Exception=>error
puts error
ensure
session.release if session
end

Ideas?

regards,

Martin

Hi,

I’m trying to connect to an internal company jabber server using
jabber4r.
The server works (I’m connected to it by the Miranda client as are 15
other people). When running the first example on the jabber4r page
(with
appropriate changes to server, username etc) the script hangs. By the
judicious use of puts statements I’ve found the script stops at the
line:

Thread.stop

at about line 230 of jabber4r/session.rb .

This is on ruby 1.8.1 (2004-01-27) [i386-mswin32]

Could you tell me which version of rexml you have?

do: ruby -r ‘rexml/document’ -e ‘puts REXML::Version’

My script looks like this:

require ‘jabber4r/jabber4r’

begin
session = Jabber::Session.bind(‘martin@xxx.yyy.au’, ‘xxx’)
puts session

session.new_message(‘lachie@xxx.yyy.au’).set_subject(‘hello’).set_body(
‘This
is jabber4r’).send

insert: sleep 10

···

On Mar 17, 2004, at 9:40 PM, Martin Stannard wrote:

rescue Exception=>error
puts error
ensure
session.release if session
end

Ideas?

regards,

Martin

Richard Kilmer rich@infoether.com wrote in message news:9E19A358-7894-11D8-916B-000A95DC41B6@infoether.com

do: ruby -r ‘rexml/document’ -e ‘puts REXML::Version’

2.5.7

My script looks like this:

require ‘jabber4r/jabber4r’

begin
session = Jabber::Session.bind(‘martin@xxx.yyy.au’, ‘xxx’)
puts session

session.new_message(‘lachie@xxx.yyy.au’).set_subject(‘hello’).set_body(
‘This
is jabber4r’).send

insert: sleep 10

This doesn’t seem to make any change - the script never executes the line:

puts session

regards,

Martin

Richard Kilmer rich@infoether.com wrote in message news:9E19A358-7894-11D8-916B-000A95DC41B6@infoether.com

do: ruby -r ‘rexml/document’ -e ‘puts REXML::Version’

2.5.7

My script looks like this:

require ‘jabber4r/jabber4r’

begin
session = Jabber::Session.bind(‘martin@xxx.yyy.au’, ‘xxx’)
puts session

session.new_message(‘lachie@xxx.yyy.au’).set_subject(‘hello’).set_body(
‘This
is jabber4r’).send

insert: sleep 10

This doesn’t seem to make any change - the script never executes the line:

puts session

regards,

Martin

This is your problem…an old version of REXML.

The one that ships with 1.8.1 (in /usr/local/lib/ruby/1.8/rexml)
should be:

2.7.3

See if you have an old copy in:

/usr/local/lib/ruby/site_ruby/1.8/rexml

-rich

···

On Mar 18, 2004, at 4:29 PM, Martin Stannard wrote:

do: ruby -r ‘rexml/document’ -e ‘puts REXML::Version’

2.5.7