{"action":"closed","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10328","repository_url":"https://api.github.com/repos/hazelcast/hazelcast","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10328/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10328/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/10328/events","html_url":"https://github.com/hazelcast/hazelcast/issues/10328","id":221308574,"number":10328,"title":"Source parameter is null on JCache.loadAll() call","user":{"login":"Donnerbart","id":4196298,"avatar_url":"https://avatars3.githubusercontent.com/u/4196298?v=4","gravatar_id":"","url":"https://api.github.com/users/Donnerbart","html_url":"https://github.com/Donnerbart","followers_url":"https://api.github.com/users/Donnerbart/followers","following_url":"https://api.github.com/users/Donnerbart/following{/other_user}","gists_url":"https://api.github.com/users/Donnerbart/gists{/gist_id}","starred_url":"https://api.github.com/users/Donnerbart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Donnerbart/subscriptions","organizations_url":"https://api.github.com/users/Donnerbart/orgs","repos_url":"https://api.github.com/users/Donnerbart/repos","events_url":"https://api.github.com/users/Donnerbart/events{/privacy}","received_events_url":"https://api.github.com/users/Donnerbart/received_events","type":"User","site_admin":false},"labels":[{"id":841621550,"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Interface:%20ICache","name":"Interface: ICache","color":"efefef","default":false},{"id":137752575,"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20Core","name":"Team: Core","color":"109def","default":false},{"id":1740690,"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Type:%20Defect","name":"Type: Defect","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":{"login":"mdogan","id":1201712,"avatar_url":"https://avatars3.githubusercontent.com/u/1201712?v=4","gravatar_id":"","url":"https://api.github.com/users/mdogan","html_url":"https://github.com/mdogan","followers_url":"https://api.github.com/users/mdogan/followers","following_url":"https://api.github.com/users/mdogan/following{/other_user}","gists_url":"https://api.github.com/users/mdogan/gists{/gist_id}","starred_url":"https://api.github.com/users/mdogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdogan/subscriptions","organizations_url":"https://api.github.com/users/mdogan/orgs","repos_url":"https://api.github.com/users/mdogan/repos","events_url":"https://api.github.com/users/mdogan/events{/privacy}","received_events_url":"https://api.github.com/users/mdogan/received_events","type":"User","site_admin":false},"assignees":[{"login":"mdogan","id":1201712,"avatar_url":"https://avatars3.githubusercontent.com/u/1201712?v=4","gravatar_id":"","url":"https://api.github.com/users/mdogan","html_url":"https://github.com/mdogan","followers_url":"https://api.github.com/users/mdogan/followers","following_url":"https://api.github.com/users/mdogan/following{/other_user}","gists_url":"https://api.github.com/users/mdogan/gists{/gist_id}","starred_url":"https://api.github.com/users/mdogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdogan/subscriptions","organizations_url":"https://api.github.com/users/mdogan/orgs","repos_url":"https://api.github.com/users/mdogan/repos","events_url":"https://api.github.com/users/mdogan/events{/privacy}","received_events_url":"https://api.github.com/users/mdogan/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/109","html_url":"https://github.com/hazelcast/hazelcast/milestone/109","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/109/labels","id":3010050,"number":109,"title":"3.9.4","description":"","creator":{"login":"degerhz","id":8373100,"avatar_url":"https://avatars3.githubusercontent.com/u/8373100?v=4","gravatar_id":"","url":"https://api.github.com/users/degerhz","html_url":"https://github.com/degerhz","followers_url":"https://api.github.com/users/degerhz/followers","following_url":"https://api.github.com/users/degerhz/following{/other_user}","gists_url":"https://api.github.com/users/degerhz/gists{/gist_id}","starred_url":"https://api.github.com/users/degerhz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degerhz/subscriptions","organizations_url":"https://api.github.com/users/degerhz/orgs","repos_url":"https://api.github.com/users/degerhz/repos","events_url":"https://api.github.com/users/degerhz/events{/privacy}","received_events_url":"https://api.github.com/users/degerhz/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":63,"state":"open","created_at":"2018-01-03T13:40:38Z","updated_at":"2018-03-27T11:37:43Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2017-04-12T15:51:57Z","updated_at":"2018-03-27T11:37:43Z","closed_at":"2018-03-27T11:37:43Z","author_association":"CONTRIBUTOR","body":"I'm adding new tests for the `loadAll()` methods of `JCache` and `IMap`: https://github.com/hazelcast/hazelcast/pull/10326\r\n\r\nThe `ClientCacheNearCacheBasicTest` fails on the method `whenLoadAllWithListenerIsUsed_thenNearCacheIsInvalidated_onDataAdapter()` and creates the following exceptions:\r\n```java\r\njava.lang.NullPointerException\r\n\tat com.hazelcast.client.impl.protocol.util.ParameterUtil.calculateDataSize(ParameterUtil.java:32)\r\n\tat com.hazelcast.client.impl.protocol.codec.CacheAddNearCacheInvalidationListenerCodec.encodeCacheBatchInvalidationEvent(CacheAddNearCacheInvalidationListenerCodec.java:168)\r\n\tat com.hazelcast.client.impl.protocol.task.cache.CacheAddNearCacheInvalidationListenerTask$NearCacheInvalidationListener.encodeBatchInvalidation(CacheAddNearCacheInvalidationListenerTask.java:63)\r\n\tat com.hazelcast.internal.nearcache.impl.invalidation.AbstractBaseNearCacheInvalidationListener.sendInvalidation(AbstractBaseNearCacheInvalidationListener.java:54)\r\n\tat com.hazelcast.client.impl.protocol.task.cache.AbstractCacheClientNearCacheInvalidationListener.handleEvent(AbstractCacheClientNearCacheInvalidationListener.java:47)\r\n\tat com.hazelcast.cache.impl.AbstractCacheService.dispatchEvent(AbstractCacheService.java:465)\r\n\tat com.hazelcast.cache.impl.AbstractCacheService.dispatchEvent(AbstractCacheService.java:65)\r\n\tat com.hazelcast.spi.impl.eventservice.impl.LocalEventDispatcher.run(LocalEventDispatcher.java:56)\r\n\tat com.hazelcast.util.executor.StripedExecutor$Worker.process(StripedExecutor.java:221)\r\n\tat com.hazelcast.util.executor.StripedExecutor$Worker.run(StripedExecutor.java:204)\r\n```\r\n\r\nThe scenario is a member and client node, both configured with a simple `CacheLoader`. The client has a Near Cache configured, invalidations are enabled.. The `loadAll()` is invoked on the member:\r\n```java\r\nICacheCompletionListener listener = new ICacheCompletionListener();\r\nmemberCache.loadAll(allKeys, true, listener);\r\nlistener.await();\r\n```\r\n\r\n```java\r\npublic class ICacheCacheLoader implements CacheLoader<Integer, String> {\r\n\r\n    @Override\r\n    public String load(Integer key) throws CacheLoaderException {\r\n        return \"newValue-\" + key;\r\n    }\r\n\r\n    @Override\r\n    public Map<Integer, String> loadAll(Iterable<? extends Integer> keys)\r\n            throws CacheLoaderException {\r\n        Map<Integer, String> entries = new HashMap<Integer, String>();\r\n        for (Integer key : keys) {\r\n            entries.put(key, \"newValue-\" + key);\r\n        }\r\n        return entries;\r\n    }\r\n}\r\n```\r\n```java\r\npublic class ICacheCompletionListener implements CompletionListener {\r\n\r\n    private final CountDownLatch completed = new CountDownLatch(1);\r\n\r\n    private volatile Exception exception;\r\n\r\n    @Override\r\n    public void onCompletion() {\r\n        completed.countDown();\r\n    }\r\n\r\n    @Override\r\n    public void onException(Exception e) {\r\n        exception = e;\r\n    }\r\n\r\n    public void await() {\r\n        HazelcastTestSupport.assertOpenEventually(completed);\r\n        if (exception != null) {\r\n            throw rethrow(exception);\r\n        }\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"mdogan"}}