I’'m trying to use smack to access GoogleTalk service, everything would be fine except I got weird class cast exception.
This line:
collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
Should return class that extends Packet abstract class. Instead I get PacketReader class instance…:
This is code from SASLAuthentication with some slight modifications:
Bind bindResource = new Bind();
bindResource.setResource(resource);
PacketCollector collector = connection
.createPacketCollector(new PacketIDFilter(bindResource.getPacketID()));
// Send the packet
connection.sendPacket(bindResource);
Bind response;
// Wait up to a certain number of seconds for a response from the server.
//Packet response = collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
Object resp=collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
System.out.println(“SASL RESPONSE CLASS:”+resp.getClass().toString());
During execution I get:
15:55:45,375 INFO Connecting to service gmail.com at talk.google.com:5222
15:55:46,078 INFO SASL RESPONSE CLASS:class org.jivesoftware.smack.PacketReader$4
I’'m using 32b JVM 1.5 on Windows XP x64 could it be tha cause of that “leak”??
That exception is thrown in private String bindResourceAndEstablishSession(String resource) function
21/2/2006 - 16:02:00
Message was edited by: baranowb