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

EtcdConfigurationSource throws NullPointerException when creating with configPath that contains directories #498

Closed
MichalSzewczyk opened this issue Jun 27, 2017 · 2 comments
Labels

Comments

@MichalSzewczyk
Copy link

Provided that there is following etcd configuration

etcdctl ls --recursive
/global
/global/key1
/global/dir1
etcdctl get /global/key1
value
etcdctl get /global/dir1
/global/dir1: is a directory

and running code below:

import com.netflix.config.source.EtcdConfigurationSource;
import org.boon.etcd.ClientBuilder;
import org.boon.etcd.Etcd;

import java.net.URI;

public class Main {
   public static void main(String[] args) {
       Etcd client = ClientBuilder.builder().hosts(URI.create("http://localhost:2379")).createClient();
       new EtcdConfigurationSource(client, "/global");
   }
}

results in :

Exception in thread "main" java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at com.netflix.config.source.EtcdConfigurationSource.cacheValues(EtcdConfigurationSource.java:75)
at com.netflix.config.source.EtcdConfigurationSource.init(EtcdConfigurationSource.java:66)
at com.netflix.config.source.EtcdConfigurationSource.<init>(EtcdConfigurationSource.java:61)
at Main.main(Main.java:11)

deleting etcd directory with command:
etcdctl rmdir /global/dir1
fixes the issue

@rgallardo-netflix
Copy link
Contributor

V1 is no longer being maintained

@rgallardo-netflix rgallardo-netflix closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2023
@rgallardo-netflix
Copy link
Contributor

This was actually fixed in #430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants