From der_julian at web.de Sat Mar 3 18:46:03 2007 From: der_julian at web.de (Julian Stecklina) Date: Sat, 03 Mar 2007 19:46:03 +0100 Subject: [cl-xmpp-devel] Namespace problem In-Reply-To: References: <45E60258.5070609@web.de> Message-ID: <45E9C26B.90002@web.de> Hello, sorry, for the mostly German mail to this English speaking list, but I felt that this might be interesting for others as well. Detlev Zundel wrote: > Aber mal was ganz anderes (tm) - mir ist gerade aufgefallen, da? Du > auch als Maintainer von cl-xmpp aufgelistet bist (komisch, das man > manchen Leuten signifikant oft ?ber den Weg l?uft :). Damit versuche > ich vergeblich eine Verbindung zu einem ejabberd-Server aufzumachen: [Detlev describes that he has difficulties connecting to an ejabberd] > > CL-USER> (defvar *connection* (xmpp:connect :hostname "jabber.denx.de")) > UNHANDLED: # >> > > Document not well-formed: Undeclared namespace prefix: stream > Context: > Line 1, column 190 in NIL > > [Condition of type CXML:WELL-FORMEDNESS-VIOLATION] > > Restarts: > 0: [ABORT-REQUEST] Abort handling SLIME request. > 1: [TERMINATE-THREAD] Terminate this thread (#) > > Backtrace: > 0: (CXML::%ERROR CXML:WELL-FORMEDNESS-VIOLATION NIL "Document not well-formed: Undeclared namespace prefix: stream") > 1: (CXML::%ERROR CXML:WELL-FORMEDNESS-VIOLATION NIL "Document not well-formed: Undeclared namespace prefix: stream") > 2: (CXML::WF-ERROR NIL "Undeclared namespace prefix: ~A" "stream") > 3: (CXML::WF-ERROR NIL "Undeclared namespace prefix: ~A") > 4: (CXML::FIND-NAMESPACE-BINDING "stream") > 5: (CXML::DECODE-QNAME "stream:features") I see the same error as you do. With an older CXML it works, nevertheless. It seems as if CXML has changed considerably: One of CXML's functions (p/document) rebinds cxml::*namespace-bindings* to cxml::*initial-namespace-bindings* and so effectively removes "stream" entry placed there by xmpp:read-stanza. As this is a showstopper, I committed a workaround to CVS, until there is a real solution to this: http://common-lisp.net/cgi-bin/viewcvs.cgi/cl-xmpp/cl-xmpp.lisp?root=cl-xmpp&r1=1.28&r2=1.29 Regards, From david at lichteblau.com Sat Mar 3 21:09:27 2007 From: david at lichteblau.com (David Lichteblau) Date: Sat, 3 Mar 2007 22:09:27 +0100 Subject: [cl-xmpp-devel] Namespace problem In-Reply-To: <45E9C26B.90002@web.de> References: <45E60258.5070609@web.de> <45E9C26B.90002@web.de> Message-ID: <20070303210926.GB27641@ununoctium> Hi, Quoting Julian Stecklina (der_julian at web.de): > One of CXML's functions (p/document) rebinds cxml::*namespace-bindings* > to cxml::*initial-namespace-bindings* and so effectively removes > "stream" entry placed there by xmpp:read-stanza. Right, that change was necessary to make CXML re-entrant. Sorry for not testing it with CL-XMPP. On the topic of testing: It would be nicer to get rid of these hacks completely. With current CXML, it should be possible to work without using any cxml internals. If I submit a patch to change CL-XMPP accordingly, could you test it for me? > As this is a showstopper, I committed a workaround to CVS, until there > is a real solution to this: > > http://common-lisp.net/cgi-bin/viewcvs.cgi/cl-xmpp/cl-xmpp.lisp?root=cl-xmpp&r1=1.28&r2=1.29 For now, can you try the following patch instead, which would not affect other uses of cxml in the same image? --- cl-xmpp.lisp 28 Aug 2006 21:17:08 -0000 1.28 +++ cl-xmpp.lisp 3 Mar 2007 21:01:36 -0000 @@ -327,10 +327,10 @@ :uri nil)))) (force-output (server-stream connection)) (catch 'stanza - (let ((cxml::*namespace-bindings* + (let ((cxml::*initial-namespace-bindings* (acons #"stream" #"http://etherx.jabber.org/streams" - cxml::*namespace-bindings*))) + cxml::*initial-namespace-bindings*))) (cxml::parse-xstream (server-xstream connection) (make-instance 'stanza-handler)) (runes::write-xstream-buffer (server-xstream connection))))) David From der_julian at web.de Sun Mar 4 04:30:43 2007 From: der_julian at web.de (Julian Stecklina) Date: Sun, 04 Mar 2007 05:30:43 +0100 Subject: [cl-xmpp-devel] Namespace problem In-Reply-To: <20070303210926.GB27641@ununoctium> References: <45E60258.5070609@web.de> <45E9C26B.90002@web.de> <20070303210926.GB27641@ununoctium> Message-ID: <45EA4B73.7010704@web.de> David Lichteblau wrote: > On the topic of testing: It would be nicer to get rid of these hacks > completely. With current CXML, it should be possible to work without > using any cxml internals. If I submit a patch to change CL-XMPP > accordingly, could you test it for me? Of course. :) > For now, can you try the following patch instead, which would not affect > other uses of cxml in the same image? Done. Regards, Julian From david at lichteblau.com Sun Mar 4 12:04:52 2007 From: david at lichteblau.com (David Lichteblau) Date: Sun, 4 Mar 2007 13:04:52 +0100 Subject: [cl-xmpp-devel] Namespace problem In-Reply-To: <45EA4B73.7010704@web.de> References: <45E60258.5070609@web.de> <45E9C26B.90002@web.de> <20070303210926.GB27641@ununoctium> <45EA4B73.7010704@web.de> Message-ID: <20070304120452.GA30621@ununoctium> Quoting Julian Stecklina (der_julian at web.de): > David Lichteblau wrote: > >On the topic of testing: It would be nicer to get rid of these hacks > >completely. With current CXML, it should be possible to work without > >using any cxml internals. If I submit a patch to change CL-XMPP > >accordingly, could you test it for me? > > Of course. :) Great! Try this one, please. It removes the stanza-handler completely. Thanks, David -------------- next part -------------- A non-text attachment was scrubbed... Name: xmpp-klacks.diff Type: text/x-diff Size: 7175 bytes Desc: not available URL: From der_julian at web.de Mon Mar 5 17:40:03 2007 From: der_julian at web.de (Julian Stecklina) Date: Mon, 05 Mar 2007 18:40:03 +0100 Subject: [cl-xmpp-devel] Namespace problem In-Reply-To: <20070304120452.GA30621@ununoctium> References: <45E60258.5070609@web.de> <45E9C26B.90002@web.de> <20070303210926.GB27641@ununoctium> <45EA4B73.7010704@web.de> <20070304120452.GA30621@ununoctium> Message-ID: <45EC55F3.5020809@web.de> David Lichteblau wrote: > Quoting Julian Stecklina (der_julian at web.de): >> David Lichteblau wrote: >>> On the topic of testing: It would be nicer to get rid of these hacks >>> completely. With current CXML, it should be possible to work without >>> using any cxml internals. If I submit a patch to change CL-XMPP >>> accordingly, could you test it for me? >> Of course. :) > > Great! Try this one, please. It removes the stanza-handler completely. Seems to work and is committed. Thanks! Regards, Julian From dzu at denx.de Wed Mar 7 14:01:37 2007 From: dzu at denx.de (Detlev Zundel) Date: Wed, 07 Mar 2007 15:01:37 +0100 Subject: [cl-xmpp-devel] Problems authenticating against ejabberd 1.1.2 Message-ID: Hi, after exchanging a few mails with Julian, he asked me to post my problems here on the mailing list, so here's the first of my problems. When trying to connect to ejabberd without TLS, I can open a connection to the server, but a subsequent authentication fails as shown below. As a test account, I use "cl-xmpp" on our server. If anyone needs the password for his own trials, simply drop me a mail or contact me (dzu at jabber.denx.de). By the way, I just found http://ejabberd.jabber.ru/node/1331 and it might just be that this is an ejabberd problem. Ok, here goes the error log: ;;;; (setf *connection* (xmpp:connect :hostname "jabber.denx.de")) ... xml version='1.0'?> UNHANDLED: # DIGEST-MD5PLAIN UNHANDLED: # ;;;; (xmpp:auth *connection* "cl-xmpp at jabber.denx.de" "cl-xmpp" " ... ; in: ; LAMBDA (#:G2630 #:G2631 #:G2632 #:G2633 #:G2634 #:G2635 #:G2636 #:G2637 ; #:G2641 #:G2642) ; (TYPEP SB-PCL::.ARG0. 'RUNES::OCTET-VECTOR-YSTREAM) ; --> SB-C::%INSTANCE-TYPEP ; ==> ; SB-PCL::.ARG0. ; ; note: deleting unreachable code ; (IF (TYPEP SB-PCL::.ARG0. 'RUNES::OCTET-VECTOR-YSTREAM) #:G2630 #:G2631) ; ; note: deleting unreachable code ; ; compilation unit finished ; printed 2 notes cl-xmpp at jabber.denx.dexxxxsbcl UNHANDLED: # CL-USER> Ok, my attempts to connect with tls are described in the next mail. Cheers Detlev -- The success of PCs is in large part due to the fact that, by making all hardware equivalent, good software enabled bad hardware. (Ugly) -- Rob Pike From dzu at denx.de Wed Mar 7 15:12:25 2007 From: dzu at denx.de (Detlev Zundel) Date: Wed, 07 Mar 2007 16:12:25 +0100 Subject: [cl-xmpp-devel] Problems connecting with TLS Message-ID: Hi, as hinted at in my previous mail, when I try to connect with TLS, I get the following error: CL-USER> (setf *connection* (xmpp:connect-tls :hostname "jabber.denx.de" :port 5223)) There is no applicable method for the generic function # when called with arguments (#S(CL-XMPP::SLOW-STREAM :TARGET #)). [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT-REQUEST] Abort handling SLIME request. 1: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) # # # #S(CL-XMPP::SLOW-STREAM :TARGET #)) 1: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) # # #) 2: (CXML::READ-TOKEN-2 #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK NIL)) 3: (CXML::PEEK-TOKEN #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK NIL)) 4: (CXML::P/XMLDECL #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK NIL)) 5: (CXML::KLACKS/XMLDECL # #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK NIL)) 6: (CXML::FILL-SOURCE #) 7: ((SB-PCL::FAST-METHOD KLACKS:PEEK-NEXT (CXML::CXML-SOURCE)) (#(14 15 17 18 19 20) . #()) # #) 8: (CL-XMPP::READ-STANZA #) 9: ((SB-PCL::FAST-METHOD CL-XMPP:RECEIVE-STANZA (CL-XMPP:CONNECTION)) # # # :STANZA-CALLBACK CL-XMPP::DEFAULT-STANZA-CALLBACK :DOM-REPR NIL) 10: (CL-XMPP:CONNECT :HOSTNAME "jabber.denx.de" :PORT 5223 :RECEIVE-STANZAS T :BEGIN-XML-STREAM T :JID-DOMAIN-PART NIL :CLASS CL-XMPP:CONNECTION) 11: (CL-XMPP:CONNECT-TLS :HOSTNAME "jabber.denx.de" :PORT 5223) 12: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CL-XMPP:CONNECT-TLS :HOSTNAME "jabber.denx.de" :PORT 5223) #) 13: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SETF *CONNECTION* (CL-XMPP:CONNECT-TLS :HOSTNAME "jabber.denx.de" :PORT 5223)) #) By the way, I use current CVS cl-xmpp. Cheers Detlev -- Of course my password is the same as my pet's name My macaw's name was Q47pY!3 and I change it every 90 days -- Trevor Linton