Hello,

  Still no luck with the PubSub client.  As suggested I used the smackx-pubsub 
jar from here:

http://people.apache.org/~ngn/vysper-repo/jivesoftware/smackx-pubsub/1.0-20090813101732-vysper/

  I then downloaded the smack and smackx 3.1.0 jars from the Ignite Software 
website.  The pubsub client compiles successfully.  I then ran the vysper 
ServerMain class, passing the pubsub module in code.  When I run the client, 
before any UI interaction I get this exception:

item-not-found(-1)
        at 
org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:52)
        at 
org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:60)
        at 
org.jivesoftware.smackx.pubsub.PubSubManager.discoverNodes(PubSubManager.java:197)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.discoverNodes(PubsubClientModel.java:94)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.refresh(PubsubClientModel.java:132)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientGUI.run(PubsubClientGUI.java:123)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Then I select "Create Node" and the following exceptions are generated:

Node created asdf
item-not-found(-1)
        at 
org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:52)
        at 
org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:60)
        at 
org.jivesoftware.smackx.pubsub.PubSubManager.discoverNodes(PubSubManager.java:197)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.discoverNodes(PubsubClientModel.java:94)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.refresh(PubsubClientModel.java:132)
        at 
org.apache.vysper.demo.pubsub.client.PubsubCreateButtonListener.actionPerformed(PubsubCreateButtonListener.java:50)
        at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6108)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:5873)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4469)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: 
org.jivesoftware.smack.packet.DefaultPacketExtension cannot be cast to 
org.jivesoftware.smackx.pubsub.Affiliation
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.discoverAffiliations(PubsubClientModel.java:69)
        at 
org.apache.vysper.demo.pubsub.client.PubsubClientModel.refresh(PubsubClientModel.java:144)
        at 
org.apache.vysper.demo.pubsub.client.PubsubCreateButtonListener.actionPerformed(PubsubCreateButtonListener.java:50)
        at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
        at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6108)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:5873)
        at java.awt.Container.processEvent(Container.java:2105)
        at java.awt.Component.dispatchEventImpl(Component.java:4469)
        at java.awt.Container.dispatchEventImpl(Container.java:2163)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
        at java.awt.Container.dispatchEventImpl(Container.java:2149)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4295)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

This error occurs both with and without the patch that Bernd provided on 
6/5/10.  Here is what the Vysper console says:

14:19:27,703 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | replacing the 
storage provider registry with 
org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry
14:19:27,730 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
servicediscovery (1.0beta)
14:19:27,735 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
roster (1.0beta)
vysper server is running...
14:19:28,005 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0092 Software Version (1.0)
14:19:28,007 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0202 Entity Time (1.0)
14:19:28,014 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0054 Vcard-temp (1.0)
14:19:28,015 | ERROR | 
org.apache.vysper.xmpp.modules.extension.xep0054_vcardtemp.VcardTempModule | no 
VcardTempPersistenceManager found
14:19:28,016 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0199 XMPP Ping (2.0)
14:19:28,017 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0049 Private Data (1.2)
14:19:28,018 | ERROR | 
org.apache.vysper.xmpp.modules.extension.xep0049_privatedata.PrivateDataModule 
| no PrivateDataPersistenceManager found
14:19:28,018 | INFO  | 
org.apache.vysper.xmpp.server.DefaultServerRuntimeContext | adding module... 
XEP-0060 Publish-Subscribe (1.13rc3)
14:19:34,463 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | 
session state changed to = INITIATED
14:19:34,486 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | 
session state changed to = STARTED
14:19:42,780 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | 
session state changed to = ENCRYPTION_STARTED
14:19:43,469 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | 
session state changed to = ENCRYPTED
14:19:43,539 | DEBUG | org.apache.vysper.xmpp.protocol.SessionStateHolder | 
session state changed to = AUTHENTICATED
14:19:43,557 | INFO  | 
org.apache.vysper.xmpp.state.resourcebinding.ResourceRegistry | added resource 
no. 1 to entity us...@localhost <- 7afe92917ba94f0f8e59f7e2fac268c2
14:19:43,558 | INFO  | 
org.apache.vysper.xmpp.state.resourcebinding.ResourceRegistry | added resource 
no. 1 to session d1e9f89f62e64f258443326ae0ed4d06 <- 
7afe92917ba94f0f8e59f7e2fac268c2
14:19:43,776 | INFO  | 
org.apache.vysper.xmpp.modules.core.im.handler.PresenceAvailabilityHandler | 
us...@localhost/7afe92917ba94f0f8e59f7e2fac268c2 has become available

Please let me know if there are ideas on what I'm doing wrong here.

thx
ken




----- Original Message -----
From: "Niklas Gustavsson" <[email protected]>
To: [email protected]
Sent: Tuesday, June 8, 2010 11:04:56 AM GMT -05:00 US/Canada Eastern
Subject: Re: XMPP PubSub Helloworld with Vysper and Smackx-PubSub

On Tue, Jun 8, 2010 at 5:01 PM, Ken Gilmer <[email protected]> wrote:
>  Is there a specific version of the smack library I should be using?

3.1.0 of both smack and smackx.

/niklas

Reply via email to