Hello!

I can see that you are using external Cache object inside your call()
method, which may not handle this flag correctly.

You should get local injected Ignite, and get cache from it.

My take:

public static class TestPeerClassLoading implements
IgniteCallable<Collection<Long>> {
    @IgniteInstanceResource
    private Ignite ignite;

    @Override
    public Collection<Long> call() throws Exception {
        IgniteCache<Long, TestObject> testCache =
ignite.getOrCreateCache(CACHE_NAME);

then, your local example will not work, since you're not running it
through compute, but you mostly get the impression.

Regards,
-- 

Ilya Kasnacheev


ср, 29 авг. 2018 г. в 21:12, smurphy <smur...@trustwave.com>:

> (Full logs and test class should be attached at the bottom..)
>
> I am running ver. 2.5.0 in client/server mode and am calling
> ignite.compute().call(..) on an IgniteCallable.
> Server node does not have any of my code on its classpath, but peer class
> loading it set to true on both the server and the client node.
>
> I am getting java.lang.ClassNotFoundException when executing the following
> line in my IgniteCallable:
> BinaryObject binaryObject = _binaryCache.get(id);
>
> I expected a binary object. I debugged into GridCacheAdapter (line 1345):
> boolean keepBinary = ctx.keepBinary();
>
> This method is returning false (I would expect this value to be true.?)
> If I manually set the value to true, then the test will pass.
>
> The callable will run successfully if I run it locally, as in not putting
> it
> in the ignite.compute.call(..) method.
> Also, the TestObject is successfully put into the cache (as a binary
> object).
> It is the get that is deserializing to the custom java object.
>
> PeerClassLoadingTest.java
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t1317/PeerClassLoadingTest.java>
>
>
> ignite.logs
> <http://apache-ignite-users.70518.x6.nabble.com/file/t1317/ignite.logs>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to