Sergey Chugunov created IGNITE-9096:
---------------------------------------

             Summary: ContinuousProcessor fails to handle routines with classes 
loaded by P2P deployment mechanism
                 Key: IGNITE-9096
                 URL: https://issues.apache.org/jira/browse/IGNITE-9096
             Project: Ignite
          Issue Type: Bug
          Components: zookeeper
    Affects Versions: 2.6
            Reporter: Sergey Chugunov
             Fix For: 2.7


When server node joins to the cluster where some CQ-routines were deployed with 
P2P deployment mechanism, it fails with the following exception:
{noformat}
class org.apache.ignite.IgniteCheckedException: Failed to start manager: 
GridManagerAdapter [enabled=true, 
name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1760)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1051)
at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2020)
at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1725)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1153)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:651)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:882)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:845)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:833)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.startGrid(GridAbstractTest.java:799)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoverySpiTest.testServerJoinWithP2PClassDeployedInCluster(ZookeeperDiscoverySpiTest.java:404)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at junit.framework.TestCase.runTest(TestCase.java:176)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2087)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:140)
at 
org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:2002)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start SPI: 
ZookeeperDiscoverySpi [zkRootPath=/apacheIgnite, 
zkConnectionString=127.0.0.1:46727,127.0.0.1:36728,127.0.0.1:34199, 
joinTimeout=0, sesTimeout=10000, clientReconnectDisabled=false, 
internalLsnr=null, 
stats=org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryStatistics@2c5b3f94]
at 
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:300)
at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:916)
at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1755)
... 19 more
Caused by: class org.apache.ignite.spi.IgniteSpiException: Failed to join 
cluster
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.startJoinAndWait(ZookeeperDiscoveryImpl.java:713)
at 
org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi.spiStart(ZookeeperDiscoverySpi.java:474)
at 
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:297)
... 21 more
Caused by: class org.apache.ignite.IgniteCheckedException: null
at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7307)
at 
org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(GridFutureAdapter.java:259)
at 
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:232)
at 
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:159)
at 
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:151)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.startJoinAndWait(ZookeeperDiscoveryImpl.java:700)
... 23 more
Caused by: java.lang.NullPointerException
at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.node(GridDiscoveryManager.java:1797)
at 
org.apache.ignite.internal.managers.deployment.GridDeploymentClassLoader.sendResourceRequest(GridDeploymentClassLoader.java:731)
at 
org.apache.ignite.internal.managers.deployment.GridDeploymentClassLoader.getResourceAsStream(GridDeploymentClassLoader.java:694)
at 
org.apache.ignite.internal.managers.deployment.GridDeploymentPerVersionStore.checkLoadRemoteClass(GridDeploymentPerVersionStore.java:717)
at 
org.apache.ignite.internal.managers.deployment.GridDeploymentPerVersionStore.getDeployment(GridDeploymentPerVersionStore.java:297)
at 
org.apache.ignite.internal.managers.deployment.GridDeploymentManager.getGlobalDeployment(GridDeploymentManager.java:494)
at 
org.apache.ignite.internal.GridEventConsumeHandler.p2pUnmarshal(GridEventConsumeHandler.java:385)
at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.startDiscoveryDataRoutine(GridContinuousProcessor.java:573)
at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.onGridDataReceived(GridContinuousProcessor.java:529)
at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$5.onExchange(GridDiscoveryManager.java:889)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.processLocalJoin(ZookeeperDiscoveryImpl.java:2946)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.processBulkJoin(ZookeeperDiscoveryImpl.java:2772)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.processNewEvents(ZookeeperDiscoveryImpl.java:2638)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.processNewEvents(ZookeeperDiscoveryImpl.java:2610)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl.access$2000(ZookeeperDiscoveryImpl.java:108)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperDiscoveryImpl$ZkWatcher.processResult(ZookeeperDiscoveryImpl.java:4120)
at 
org.apache.ignite.spi.discovery.zk.internal.ZookeeperClient$DataCallbackWrapper.processResult(ZookeeperClient.java:1163)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:561)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
{noformat}

Test reproducing the error:

{noformat}
    public void testServerJoinWithP2PClassDeployedInCluster() throws Exception {
        //external class loader to make sure that class is not presented on 
server node's classpath
        ClassLoader extLdr = getExternalClassLoader();

        p2pEnabled = true;

        startGrid(0);

        clientMode(true);

        Ignite client = startGrid(1);

        Class<?> cls = 
extLdr.loadClass("org.apache.ignite.tests.p2p.GridEventConsumeFilter");

        client.events().remoteListen(
            new IgniteBiPredicate<UUID, Event>() {
                @Override public boolean apply(UUID uuid, Event event) {
                    return true;
                }
            },
            (IgnitePredicate<Event>) cls.newInstance(),

            EventType.EVT_CACHE_OBJECT_PUT
        );

        clientMode(false);

        startGrid(2);
    }
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to