Projects tigase _server tigase-pubsub Issues #2
NPE in RetrieveItemsModule (#2)
wojciech.kapcia@tigase.net opened 6 years ago
2019-05-03 16:47:44.478 [in_7-pubsub]      StanzaProcessor.processPacket()         SEVERE:   java.lang.NullPointerException when processing from=c2s@ip-10-0-28-23.us-west-2.compute.internal/10.0.28.23_5223_181.163.122.88_55572, to=null, DATA=<iq xmlns="jabber:client" to="wojtek@tigase.im" id="C8839F28-C2BF-4D43-974D-F8445DA72BAB" from="wojtek@tigase.im/959732298-tigase-71" type="get"><pubsub xmlns="http://jabber.org/protocol/pubsub"><items node="eu.siacs.conversations.axolotl.bundles:386297800"><item id="current"/></items></pubsub></iq>, SIZE=300, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=ADMIN, TYPE=get
java.lang.RuntimeException: java.lang.NullPointerException
        at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:154)
        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:188)
        at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1357)
Caused by: java.lang.NullPointerException
        at tigase.pubsub.repository.PubSubDAOJDBC.getItem(PubSubDAOJDBC.java:282)
        at tigase.pubsub.repository.PubSubDAOJDBC.getItem(PubSubDAOJDBC.java:47)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
        at com.sun.proxy.$Proxy42.getItem(Unknown Source)
        at tigase.pubsub.repository.PubSubDAOPool.getItem(PubSubDAOPool.java:190)
        at tigase.pubsub.repository.cached.Items.getItem(Items.java:70)
        at tigase.pubsub.modules.RetrieveItemsModule.process(RetrieveItemsModule.java:86)
        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:188)
        at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:183)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1357)
Andrzej Wójcik (Tigase) commented 6 years ago

I've improved check to make sure that node exists during the retrieval and modified CachedPubSubRepository.getNodeItems() to make sure that it will return null if it will not find node id instead of returning a class which could contain null as node id value.

Referenced from commit 1 year ago
Referenced from commit 1 year ago
Referenced from commit 1 year ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
8933
Spent time
1h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-pubsub#2
Please wait...
Page is in error, reload to recover