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

NPE when trying to use it #11

Open
fstocker1 opened this issue Dec 9, 2019 · 0 comments
Open

NPE when trying to use it #11

fstocker1 opened this issue Dec 9, 2019 · 0 comments

Comments

@fstocker1
Copy link

When I tried I get an NPE

Refresh rate set to: PT30S monitoring ilos: [192.168.150.63] using credentials: Credentials [username=root, password=********] Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051) at com.google.common.cache.LocalCache.get(LocalCache.java:3953) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3976) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4960) at ilo.IloCollector.collect(IloCollector.java:66) at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:100) at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50) at io.prometheus.client.Collector.register(Collector.java:139) at io.prometheus.client.Collector.register(Collector.java:132) at ilo.IloExporter.<clinit>(IloExporter.java:8) Caused by: java.lang.NullPointerException at ilo.StorageClient.getArrays(StorageClient.java:33) at ilo.StorageClient.getStorageNode(StorageClient.java:46) at ilo.IloHttpClient.getStorageNode(IloHttpClient.java:133) at ilo.IloHttpClient.getSystemNode(IloHttpClient.java:116) at ilo.IloHttpClient.getChassisNode(IloHttpClient.java:76) at ilo.IloCollector$1.load(IloCollector.java:47) at ilo.IloCollector$1.load(IloCollector.java:43) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ... 9 more
so it's supposedly at this line:
for (JsonNode arrayMember : arrayControllers.get("links").get("Member")) {

(I guess there is no "links" in my situation and therefore the .get("Member") throws the NPE.

Got a good workaround for this ?

Thanks for your help

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

No branches or pull requests

1 participant