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

[systeminfo] 2.5M2 - ERROR - Cannot instantate Systeminfo object! #5921

Closed
msexton187 opened this issue Aug 12, 2019 · 3 comments · Fixed by #5929
Closed

[systeminfo] 2.5M2 - ERROR - Cannot instantate Systeminfo object! #5921

msexton187 opened this issue Aug 12, 2019 · 3 comments · Fixed by #5929
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@msexton187
Copy link

msexton187 commented Aug 12, 2019

After upgrade to openHab 2.5M2 the systeminfo v2 binding no longer works. When adding the Local Computer item from the Inbox the following ERROR is raised.

2019-08-12 17:35:13.035 [ERROR] [.systeminfo.internal.handler.SysteminfoHandler] - Cannot instantate Systeminfo object!
java.lang.ArrayIndexOutOfBoundsException: 0
	at com.sun.jna.Structure.toArray(Structure.java:1626) ~[?:?]
	at com.sun.jna.platform.win32.Kernel32Util.getLogicalProcessorInformation(Kernel32Util.java:675) ~[?:?]
	at oshi.hardware.platform.windows.WindowsCentralProcessor.calculateProcessorCounts(WindowsCentralProcessor.java:259) ~[?:?]
	at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:120) ~[?:?]
	at oshi.hardware.platform.windows.WindowsCentralProcessor.<init>(WindowsCentralProcessor.java:208) ~[?:?]
	at oshi.hardware.platform.windows.WindowsHardwareAbstractionLayer.getProcessor(WindowsHardwareAbstractionLayer.java:70) ~[?:?]
	at org.openhab.binding.systeminfo.internal.model.OSHISysteminfo.initializeSysteminfo(OSHISysteminfo.java:91) ~[302:org.openhab.binding.systeminfo:2.5.0.M2]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.instantiateSysteminfoLibrary(SysteminfoHandler.java:123) [302:org.openhab.binding.systeminfo:2.5.0.M2]
	at org.openhab.binding.systeminfo.internal.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:109) [302:org.openhab.binding.systeminfo:2.5.0.M2]
	at sun.reflect.GeneratedMethodAccessor67.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:152) [133:org.openhab.core:2.5.0.M2]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [133:org.openhab.core:2.5.0.M2]
	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) [?:?]

This issue wasn't present in 2.4 or 2.5M1

Your Environment

Windows 10
Java jre1.8.0_191
openhab 2.5.0.M2
systeminfo 2.5.0.M2

@wborn
Copy link
Member

wborn commented Aug 13, 2019

It seems to be a bug in JNA which can be fixed by upgrading JNA from 5.3.0 to 5.3.1:

See:

@wborn wborn added the bug An unexpected problem or unintended behavior of an add-on label Aug 13, 2019
@msexton187
Copy link
Author

msexton187 commented Aug 13, 2019 via email

@wborn
Copy link
Member

wborn commented Aug 13, 2019

We'll need to update some version numbers. When those have been updated it will eventually be available in a new snapshot build. :-)

wborn added a commit to wborn/openhab-addons that referenced this issue Aug 14, 2019
* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
wborn added a commit to wborn/openhab-addons that referenced this issue Aug 14, 2019
* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
wborn added a commit to wborn/openhab-addons that referenced this issue Aug 14, 2019
* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
wborn added a commit to wborn/openhab-addons that referenced this issue Aug 14, 2019
* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
J-N-K pushed a commit that referenced this issue Aug 15, 2019
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes #5921

Signed-off-by: Wouter Born <[email protected]>
sprehn pushed a commit to sprehn/openhab-addons that referenced this issue Aug 21, 2019
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
chaton78 pushed a commit to chaton78/openhab-addons that referenced this issue Sep 2, 2019
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Pascal Larin <[email protected]>
ne0h pushed a commit to ne0h/openhab-addons that referenced this issue Sep 15, 2019
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Maximilian Hess <[email protected]>
Pshatsillo pushed a commit to Pshatsillo/openhab-addons that referenced this issue Dec 8, 2019
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
tmrobert8 pushed a commit to tmrobert8/openhab-addons that referenced this issue Jan 21, 2020
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Tim Roberts <[email protected]>
hww3 pushed a commit to hww3/openhab2-addons that referenced this issue Feb 22, 2020
* [systeminfo] Update dependencies and add null annotations

* Update oshi to 4.0.0
* Update jna to 5.4.0
* Add null annotations

The cpu#load channel is removed because its data is no longer provided by oshi.
The load1, load5 and load15 channels can be used instead.
On the Oracle JVM this information can also be obtained using com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()

See also:
* https://github.com/oshi/oshi/blob/master/UPGRADING.md
* https://github.com/oshi/oshi/blob/master/CHANGELOG.md#400-8102019

Fixes openhab#5921

Signed-off-by: Wouter Born <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants