Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Communications Framework (ECF) » Can't get XMPPClient to work
Can't get XMPPClient to work [message #607577] Mon, 04 September 2006 10:28 Go to next message
Eclipse UserFriend
Originally posted by: ronny.duwyn.agfa.com

Hi,

Has anyone tried the XMPPClient or XMPPChatClient in release 0.9.0 ?
I started a server: localhost:3282.
I'm running (debugging) a XMPPClient (robot) to get an understanding of
how it all works, but at
XMPPChatClient line 86:
getContainer().connect(targetID,ConnectContextFactory.create PasswordConnectContext(password));
it fails.
The server generates following error:

(trace)connection[09/04/06;12:18:49:371]accept:/127.0.0.1
(trace)connection[09/04/06;12:18:49:402]Unexpected exception in
handleAccept...closing
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at
org.eclipse.ecf.provider.generic.TCPServerSOContainerGroup.h andleAccept(TCPServerSOContainerGroup.java:99)
at org.eclipse.ecf.provider.comm.tcp.Server$2.run(Server.java:8 2)
at java.lang.Thread.run(Unknown Source)

an the client this one:

java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(Unknown Source)
at sun.nio.cs.StreamEncoder.flush(Unknown Source)
at java.io.OutputStreamWriter.flush(Unknown Source)
at java.io.BufferedWriter.flush(Unknown Source)
at org.jivesoftware.smack.PacketWriter.writePackets(PacketWrite r.java:242)
at org.jivesoftware.smack.PacketWriter.access$2(PacketWriter.ja va:232)
at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java: 70)
org.xmlpull.v1.XmlPullParserException: only whitespace content allowed
before start tag and not \ufffd (position: START_DOCUMENT seen \ufffd...
@1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1542)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1418)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1137)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReade r.java:377)
at org.jivesoftware.smack.PacketReader.access$0(PacketReader.ja va:275)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java: 63)

What am i doing wrong?

Thanx for a response in advance
Re: Can't get XMPPClient to work [message #607581 is a reply to message #607577] Thu, 07 September 2006 02:12 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Ronny,

I think you are trying to connect to an ECF generic server (running on
localhost) with an XMPP client. The ECF generic server uses a protocol
different than XMPP (it uses the 'ECF generic' protocol :).

There is a trivial ECF generic client (as java application) in

plugin: org.eclipse.ecf.provider
class: org.eclipse.ecf.provider.app.ClientApplication.

See particularly the 'createClient()' method. There are also a number
of examples of creating ECF generic clients in the org.eclipse.ecf.test
plugin (in CVS repository).

OR you can connect to an XMPP server with the XMPPClient...of your own
if you've got one...or via google talk (username@gmail.com). But the
main thing is that you've got to have a match between the protocol
provider used (XMPP or ECF generic) and the server that you are trying
to connect to.

Scott



Ronny Duwyn wrote:
> Hi,
>
> Has anyone tried the XMPPClient or XMPPChatClient in release 0.9.0 ?
> I started a server: localhost:3282.
> I'm running (debugging) a XMPPClient (robot) to get an understanding of
> how it all works, but at XMPPChatClient line 86:
> getContainer().connect(targetID,ConnectContextFactory.create PasswordConnectContext(password));
>
> it fails.
> The server generates following error:
> (trace)connection[09/04/06;12:18:49:371]accept:/127.0.0.1
> (trace)connection[09/04/06;12:18:49:402]Unexpected exception in
> handleAccept...closing
> java.io.StreamCorruptedException: invalid stream header
> at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
> at java.io.ObjectInputStream.<init>(Unknown Source)
> at
> org.eclipse.ecf.provider.generic.TCPServerSOContainerGroup.h andleAccept(TCPServerSOContainerGroup.java:99)
>
> at org.eclipse.ecf.provider.comm.tcp.Server$2.run(Server.java:8 2)
> at java.lang.Thread.run(Unknown Source)
>
> an the client this one:
>
> java.net.SocketException: Software caused connection abort: socket write
> error
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at java.net.SocketOutputStream.socketWrite(Unknown Source)
> at java.net.SocketOutputStream.write(Unknown Source)
> at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source)
> at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(Unknown Source)
> at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(Unknown Source)
> at sun.nio.cs.StreamEncoder.flush(Unknown Source)
> at java.io.OutputStreamWriter.flush(Unknown Source)
> at java.io.BufferedWriter.flush(Unknown Source)
> at
> org.jivesoftware.smack.PacketWriter.writePackets(PacketWrite r.java:242)
> at org.jivesoftware.smack.PacketWriter.access$2(PacketWriter.ja va:232)
> at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java: 70)
> org.xmlpull.v1.XmlPullParserException: only whitespace content allowed
> before start tag and not \ufffd (position: START_DOCUMENT seen \ufffd...
> @1:1) at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1542)
> at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1418)
> at org.xmlpull.mxp1.MXParser.next(MXParser.java:1137)
> at
> org.jivesoftware.smack.PacketReader.parsePackets(PacketReade r.java:377)
> at org.jivesoftware.smack.PacketReader.access$0(PacketReader.ja va:275)
> at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java: 63)
>
> What am i doing wrong?
>
> Thanx for a response in advance
>
Re: Can't get XMPPClient to work [message #607583 is a reply to message #607581] Wed, 13 September 2006 06:49 Go to previous message
Eclipse UserFriend
Originally posted by: ronny.duwyn.agfa.com

Hi Scott,
Indeed, that was the case.
Thnx,

Ronny
Previous Topic:How XMPP over SSL works
Next Topic:Shared_Text_Editor
Goto Forum:
  


Current Time: Wed Aug 12 21:11:40 GMT 2020

Powered by FUDForum. Page generated in 0.02005 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top