Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

[hue] An error occurred while calling method 'ThingHandler.handleCommand()' on ... (NPE) #5373

Closed
cweitkamp opened this issue Apr 6, 2018 · 6 comments · Fixed by #5390
Closed

Comments

@cweitkamp
Copy link
Contributor

cweitkamp commented Apr 6, 2018

I upgraded to OH2 1521 earlier this day. This version is based on ESH 263. The hue binding has some issues right now. #5318 replaces catching a NullPointerException but it looks like we have some more potential NPE lines of code in there.

2018-04-06 20:32:58.052 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.eclipse.smarthome.binding.hue.handler.HueLightHandler@11d270': null
java.lang.NullPointerException: null
	at org.eclipse.smarthome.binding.hue.internal.ErrorResponse$Error.access$0(ErrorResponse.java:30) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.binding.hue.internal.ErrorResponse.getType(ErrorResponse.java:38) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.binding.hue.internal.HueBridge.handleErrors(HueBridge.java:880) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.binding.hue.internal.HueBridge.setLightState(HueBridge.java:266) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler.updateLightState(HueBridgeHandler.java:201) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.binding.hue.handler.HueLightHandler.handleCommand(HueLightHandler.java:276) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.10.0.201804051647]
	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [103:org.eclipse.smarthome.core:0.10.0.201804051647]
	at com.sun.proxy.$Proxy155.handleCommand(Unknown Source) [209:org.eclipse.smarthome.binding.hue:0.10.0.201804051647]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [110:org.eclipse.smarthome.core.thing:0.10.0.201804051647]
	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [110:org.eclipse.smarthome.core.thing:0.10.0.201804051647]
	at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.10.0.201804051647]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.10.0.201804051647]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
@LightIsLife
Copy link

Only lending a supporting voice to this issue, seeing the same problem since upgrading to the latest snapshot on 6/4/2018 (OH2 on VM running Ubuntu)

@jboeddeker
Copy link

on openHAB 1252 the issue is still existing.

2018-04-09 01:02:53.253 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.eclipse.smarthome.binding.hue.handler.HueLightHandler@9d2015': null

java.lang.NullPointerException: null
	at org.eclipse.smarthome.binding.hue.internal.ErrorResponse$Error.access$0(ErrorResponse.java:30) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.binding.hue.internal.ErrorResponse.getType(ErrorResponse.java:38) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.binding.hue.internal.HueBridge.handleErrors(HueBridge.java:880) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.binding.hue.internal.HueBridge.setLightState(HueBridge.java:266) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler.updateLightState(HueBridgeHandler.java:201) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.binding.hue.handler.HueLightHandler.handleCommand(HueLightHandler.java:276) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.10.0.201804081055]
	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [103:org.eclipse.smarthome.core:0.10.0.201804081055]
	at com.sun.proxy.$Proxy149.handleCommand(Unknown Source) [223:org.eclipse.smarthome.binding.hue:0.10.0.201804081055]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [110:org.eclipse.smarthome.core.thing:0.10.0.201804081055]
	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [110:org.eclipse.smarthome.core.thing:0.10.0.201804081055]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [103:org.eclipse.smarthome.core:0.10.0.201804081055]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [103:org.eclipse.smarthome.core:0.10.0.201804081055]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

@kaikreuzer
Copy link
Contributor

I upgraded to OH2 #1521 earlier this day. This version is based on ESH #263.

@cweitkamp Please refrain from using "#" for such references as it will link the github issues with those numbers (which are obviously completely unrelated).

@jboeddeker
Copy link

According to my opinion, we have currently two issues with the hue-bridge-thing.

The first one is the constant loss of connection and reconnection, the other one is the NPE when sending a command.

Should we add a second issue?

@sjsf
Copy link
Contributor

sjsf commented Apr 9, 2018

Look like #5318 did some severe damage to the hue binding. I'm about to push a fix.

sjsf pushed a commit to sjsf/smarthome that referenced this issue Apr 9, 2018
...which were introduced by eclipse-archived#5318.

fixes eclipse-archived#5373
Signed-off-by: Simon Kaufmann <[email protected]>
@sjsf sjsf mentioned this issue Apr 9, 2018
@cweitkamp
Copy link
Contributor Author

Please refrain from using "#" for such references

No problem. I will do that. Changed it in my initial post.

kaikreuzer pushed a commit that referenced this issue Apr 9, 2018
...which were introduced by #5318.

fixes #5373
Signed-off-by: Simon Kaufmann <[email protected]>
afuechsel pushed a commit to afuechsel/smarthome that referenced this issue Apr 13, 2018
...which were introduced by eclipse-archived#5318.

fixes eclipse-archived#5373
Signed-off-by: Simon Kaufmann <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants