Projects tigase _server tigase-pubsub Issues #105
NPE in RetrieveItemsModule (#105)
Closed
wojciech.kapcia@tigase.net opened 4 years ago
[2020-08-10 13:15:52:494] [SEVERE  ] [           in_7-pubsub ] StanzaProcessor.processPacket()  : java.lang.NullPointerException when processing from=c2s@ip-10-0-44-219.us-west-2.compute.internal/10.0.44.219_5223_70.95.146.126_56596, to=pubsub@ip-10-0-44-219.us-west-2.compute.internal, DATA=…, SIZE=317, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=get, STABLE_ID=null
java.lang.RuntimeException: java.lang.NullPointerException
	at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:148)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:164)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:85)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:191)
	at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1405)
Caused by: java.lang.NullPointerException
	at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:87)
	... 6 more

wojciech.kapcia@tigase.net commented 4 years ago

Stanza

<iq to="artur.hefczyc@tigase.org" type="get" from="artur.hefczyc@tigase.org/1505915227-tigase-9"
    id="A1746CF9-81AF-46F4-84AA-51969E6715E9" xmlns="jabber:client">
    <pubsub xmlns="http://jabber.org/protocol/pubsub">
        <items node="eu.siacs.conversations.axolotl.bundles:1451681114">
            <item id="current"/>
        </items>
    </pubsub>
</iq>

Full log entry

[2020-08-10 13:15:52:494] [SEVERE  ] [           in_7-pubsub ] StanzaProcessor.processPacket()  : java.lang.NullPointerException when processing from=c2s@ip-10-0-44-219.us-west-2.compute.internal/10.0.44.219_5223_70.95.146.126_56596, to=pubsub@ip-10-0-44-219.us-west-2.compute.internal, DATA=[iq to=&quot;artur.hefczyc@tigase.org&quot; type=&quot;get&quot; from=&quot;artur.hefczyc@tigase.org/1505915227-tigase-9&quot; id=&quot;A1746CF9-81AF-46F4-84AA-51969E6715E9&quot; xmlns=&quot;jabber:client&quot;][pubsub xmlns=&quot;http://jabber.org/protocol/pubsub&quot;][items node=&quot;eu.siacs.conversations.axolotl.bundles:1451681114&quot;][item id=&quot;current&quot;/][/items][/pubsub][/iq], SIZE=317, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=get, STABLE_ID=null
java.lang.RuntimeException: java.lang.NullPointerException
	at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:148)
	at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:164)
	at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:85)
	at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
	at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:191)
	at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1405)
Caused by: java.lang.NullPointerException
	at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:87)
	... 6 more

Andrzej Wójcik (Tigase) commented 4 years ago

The issue was caused by recent change which allowed creation of PubSub node when item is being published to non-existing node. As an error, it allowed to query PubSub node items even if node did not exist.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Spent time
2h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-pubsub#105
Please wait...
Page is in error, reload to recover