geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emily Yeh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GEODE-3033) NPE when jarFileNames is null in ClusterConfigurationLoader
Date Mon, 05 Jun 2017 21:18:04 GMT

     [ https://issues.apache.org/jira/browse/GEODE-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emily Yeh updated GEODE-3033:
-----------------------------
    Description: 
(Copied from original email by Barry Oglesby)

I got this NPE attempting to roll from 9.0.4 to develop (starting a develop server using a
9.0.4 locator):

{code}
Exception in thread "main" java.lang.NullPointerException
	at java.util.Arrays.stream(Arrays.java:5004)
	at java.util.stream.Stream.of(Stream.java:1000)
	at org.apache.geode.internal.cache.ClusterConfigurationLoader.deployJarsReceivedFromClusterConfiguration(ClusterConfigurationLoader.java:75)
	at org.apache.geode.internal.cache.GemFireCacheImpl.deployJarsReceivedFromClusterConfiguration(GemFireCacheImpl.java:1033)
	at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1150)
	at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
	at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:
{code}    

In this case, `jarFileNames` is null, so this line fails:

logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));

Moving the logger message inside the null checks fixes the issue:

if (jarFileNames != null && jarBytes != null) {
  logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));

  was:
(Copied from original email by Barry Oglesby)

I got this NPE attempting to roll from 9.0.4 to develop (starting a develop server using a
9.0.4 locator):

Exception in thread "main" java.lang.NullPointerException
	at java.util.Arrays.stream(Arrays.java:5004)
	at java.util.stream.Stream.of(Stream.java:1000)
	at org.apache.geode.internal.cache.ClusterConfigurationLoader.deployJarsReceivedFromClusterConfiguration(ClusterConfigurationLoader.java:75)
	at org.apache.geode.internal.cache.GemFireCacheImpl.deployJarsReceivedFromClusterConfiguration(GemFireCacheImpl.java:1033)
	at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1150)
	at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
	at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:
    
In this case, jarFileNames is null, so this line fails:

logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));

Moving the logger message inside the null checks fixes the issue:

if (jarFileNames != null && jarBytes != null) {
  logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));


> NPE when jarFileNames is null in ClusterConfigurationLoader
> -----------------------------------------------------------
>
>                 Key: GEODE-3033
>                 URL: https://issues.apache.org/jira/browse/GEODE-3033
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Emily Yeh
>
> (Copied from original email by Barry Oglesby)
> I got this NPE attempting to roll from 9.0.4 to develop (starting a develop server using
a 9.0.4 locator):
> {code}
> Exception in thread "main" java.lang.NullPointerException
> 	at java.util.Arrays.stream(Arrays.java:5004)
> 	at java.util.stream.Stream.of(Stream.java:1000)
> 	at org.apache.geode.internal.cache.ClusterConfigurationLoader.deployJarsReceivedFromClusterConfiguration(ClusterConfigurationLoader.java:75)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.deployJarsReceivedFromClusterConfiguration(GemFireCacheImpl.java:1033)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1150)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
> 	at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
> 	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:
> {code}    
> In this case, `jarFileNames` is null, so this line fails:
> logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));
> Moving the logger message inside the null checks fixes the issue:
> if (jarFileNames != null && jarBytes != null) {
>   logger.info("Got response with jars: {}", Stream.of(jarFileNames).collect(joining(",")));



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message