[jitsi-dev] Class Cast Exception inside org.jivesoftware.smackx.workgroup.agent.Agent Class


#1

Hi All,

         When I tried to call getWorkgroups Method of
org.jivesoftware.smackx.workgroup.agent.Agent using following code

···

====================
Collection<String> agentWorkCol =
Agent.getWorkgroups("workgroup.127.0.0.1","thomaz@127.0.0.1",con);

in jitsi; I am getting following error

[java] java.lang.ClassCastException:
org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to
org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups
     [java] at
org.jivesoftware.smackx.workgroup.agent.Agent.getWorkgroups(Agent.java:49)
     [java] at
net.java.sip.communicator.plugin.webchat.WebchatPluginMenuItem.actionPerformed(WebchatPluginMenuItem.java:231)
: ====================

But this is working fine in an independent class using same smackx, smack
libraries used in jitsi

Please anyone can have a solution for this..
Regards,
Haridas


#2

Same comment:

Are both of the packages mentioned in the exception properly exported by smack and imported by your bundle?

Emil

···

On 25.07.13, 14:29, haridas karunakaran Pillai wrote:

Hi All,

          When I tried to call getWorkgroups Method of
org.jivesoftware.smackx.workgroup.agent.Agent using following code

====================
Collection<String> agentWorkCol =
Agent.getWorkgroups("workgroup.127.0.0.1","thomaz@127.0.0.1
<mailto:thomaz@127.0.0.1>",con);

in jitsi; I am getting following error

[java] java.lang.ClassCastException:
org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to
org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups
      [java] at
org.jivesoftware.smackx.workgroup.agent.Agent.getWorkgroups(Agent.java:49)
      [java] at
net.java.sip.communicator.plugin.webchat.WebchatPluginMenuItem.actionPerformed(WebchatPluginMenuItem.java:231)
: ====================

But this is working fine in an independent class using same smackx,
smack libraries used in jitsi

Please anyone can have a solution for this..
Regards,
Haridas

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
https://jitsi.org


#3

Hi,

you can check net.java.sip.communicator.impl.protocol.jabber.ProviderManagerExt
there are the providers that are used in smack to parse incoming
packets. Wwe haven't enabled those for
org.jivesoftware.smackx.workgroup. package. Check them out, not
enabled providers are commented.

Regards
damencho

···

On Thu, Jul 25, 2013 at 3:29 PM, haridas karunakaran Pillai <haridaskpillai@gmail.com> wrote:

Hi All,

         When I tried to call getWorkgroups Method of
org.jivesoftware.smackx.workgroup.agent.Agent using following code

====================
Collection<String> agentWorkCol =
Agent.getWorkgroups("workgroup.127.0.0.1","thomaz@127.0.0.1",con);

in jitsi; I am getting following error

[java] java.lang.ClassCastException:
org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to
org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups
     [java] at
org.jivesoftware.smackx.workgroup.agent.Agent.getWorkgroups(Agent.java:49)
     [java] at
net.java.sip.communicator.plugin.webchat.WebchatPluginMenuItem.actionPerformed(WebchatPluginMenuItem.java:231)
: ====================

But this is working fine in an independent class using same smackx, smack
libraries used in jitsi

Please anyone can have a solution for this..
Regards,
Haridas

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

Thanks Damien,
                           I found out this issue ..and fixed...Thanks for
your help..

Regards,
Haridas

···

On Mon, Aug 5, 2013 at 9:31 PM, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

you can check
net.java.sip.communicator.impl.protocol.jabber.ProviderManagerExt
there are the providers that are used in smack to parse incoming
packets. Wwe haven't enabled those for
org.jivesoftware.smackx.workgroup. package. Check them out, not
enabled providers are commented.

Regards
damencho

On Thu, Jul 25, 2013 at 3:29 PM, haridas karunakaran Pillai > <haridaskpillai@gmail.com> wrote:
> Hi All,
>
> When I tried to call getWorkgroups Method of
> org.jivesoftware.smackx.workgroup.agent.Agent using following code
>
> ====================
> Collection<String> agentWorkCol =
> Agent.getWorkgroups("workgroup.127.0.0.1","thomaz@127.0.0.1",con);
> ==========
>
>
> in jitsi; I am getting following error
> ==========================
> [java] java.lang.ClassCastException:
> org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to
> org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups
> [java] at
>
org.jivesoftware.smackx.workgroup.agent.Agent.getWorkgroups(Agent.java:49)
> [java] at
>
net.java.sip.communicator.plugin.webchat.WebchatPluginMenuItem.actionPerformed(WebchatPluginMenuItem.java:231)
> : ====================
>
>
> But this is working fine in an independent class using same smackx, smack
> libraries used in jitsi
>
> Please anyone can have a solution for this..
> Regards,
> Haridas
>
>
> _______________________________________________
> dev mailing list
> dev@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
So close , No matter how far