Hi all,
I have met a problem when using continuous query with remote filter if p2p class loading is enabled. I have pasted the testing code in gist https://gist.github.com/jackeylu/edf600b66273d17db0438065ae362934 , and you can reproduce it with the follow operations, 1. start an Ignite server with class IgniteServer 2. start the CQ client with class CQListenerClient, it will create a continuous query cursor for the CacheEntryEvent. In my case, I have a remote filter named EventPrinter which has its externalization methods. 3. start the third node with class IgniteSimpleClient, and exception occurs. [15:19:02,567][SEVERE][tcp-client-disco-msg-worker-#4%null%][TcpDiscoverySpi] Runtime error caught during grid runnable execution: IgniteSpiThread [name=tcp-client-disco-msg-worker-#4%null%] java.lang.NullPointerException at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandlerV2.getEventFilter(CacheContinuousQueryHandlerV2.java:111) at org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler.register(CacheContinuousQueryHandler.java:319) at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.registerHandler(GridContinuousProcessor.java:1101) at org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.onDiscoveryDataReceived(GridContinuousProcessor.java:470) at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$5.onExchange(GridDiscoveryManager.java:668) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.onExchange(TcpDiscoverySpi.java:1723) at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processNodeAddFinishedMessage(ClientImpl.java:1670) at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processDiscoveryMessage(ClientImpl.java:1553) at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1478) at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62) my ignite version is ver. 1.6.0#20160518-sha1:0b22c45b. And log files for the 3 nodes are 1. the first node, ignite-2e8beaca.0.log 2. the second node, ignite-f12fd69b.0.log 3. the third node, ignite-2c73bf53.0.log I think, it is may be a bug of p2p class loading, when p2p is enabled, the remote filter factory will be deployed by a DeployableObject wrapper, but when the 3rd simple and normal node join the cluster, it does not get the remoteFilterFactory, it get the remoteFilterFactoryDep from readExternal method which cause the remoteFilterFactory is null, and cause the NULLPointerException. I think, if the third node can get the remoteFilterFactory with the method p2pUnmarshall in org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandlerV2, then the problem can be solved, but currently it is not. If I turn off the peer class loading, the remoteFilterFactory can be serialized and deserialized with the writeExternal/readExternal method, and everything will be OK. But, I can't do it like this, because in my case, the remote filter is coming from some third party jars, they are not implemented JDK java.io.Serializableor java.io.Externalizable interfaces. Any advice are welcomed, thank you so much. Regards, Lin.
ignite-2c73bf53.0.log
Description: Binary data
ignite-2e8beaca.0.log
Description: Binary data
ignite-f12fd69b.0.log
Description: Binary data
