Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hazelcast 2.6.5 throws NullPointerException if the MapStore.load() method return null during IMap.getAll() execution #1605

Closed
patriziomunzi opened this issue Jan 22, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@patriziomunzi
Copy link

commented Jan 22, 2014

Here's the stacktrace:

java.lang.NullPointerException
    at com.hazelcast.impl.base.KeyValue.getValue(KeyValue.java:87)
    at com.hazelcast.impl.ConcurrentMapManager.getAll(ConcurrentMapManager.java:816)
    at com.hazelcast.impl.MProxyImpl$MProxyReal.getAll(MProxyImpl.java:590)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.hazelcast.impl.MProxyImpl$DynamicInvoker.invoke(MProxyImpl.java:66)
    at com.sun.proxy.$Proxy15.getAll(Unknown Source)
    at com.hazelcast.impl.MProxyImpl.getAll(MProxyImpl.java:218)
    at com.hazelcast.cache.HazelcastCacheWrapper.init(HazelcastCacheWrapper.java:63)
    at com.hypertv.gaming.cache.util.HTGamingUserActionListCacheUtil.init(HTGamingUserActionListCacheUtil.java:122)
    at com.hypertv.gaming.InitializationListener.init(InitializationListener.java:93)
    at com.hypertv.gaming.InitializationListener.contextInitialized(InitializationListener.java:56)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:775)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
    at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:767)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1252)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
    at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
    at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
    at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
    at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:163)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:61)
    at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:663)
    at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:543)
    at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
    at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:353)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

@ghost ghost assigned gurbuzali Jan 23, 2014

@gurbuzali

This comment has been minimized.

Copy link
Member

commented Jan 23, 2014

can you post your MapStore implementation?
normally for getAll operation MapStore.loadAll method should be called.

@patriziomunzi

This comment has been minimized.

Copy link
Author

commented Jan 23, 2014

sorry you're right the problem happens when the map returned from the MapStore.loadAll() as an entry with value = null;
I mean this:

public Map loadAll(Collection keys) {
[...]
entries.put(key, null);
return entries;
}

Patrizio Munzi
email: patrizio.munzi@gmail.com
mobile: +39 393 7195164
skype: patrizio.munzi

On 23 Jan 2014, at 10:32, Ali notifications@github.com wrote:

can you post you MapStore implementation?
normally for getAll operation MapStore.loadAll method should be called.


Reply to this email directly or view it on GitHub.

@gurbuzali

This comment has been minimized.

Copy link
Member

commented Jan 23, 2014

well then the npe is normal because we do not accept null value.
I am closing the issue then

@gurbuzali gurbuzali closed this Jan 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.