nibi79 / worxlandroid

openHAB Binding for Worx Landroid
60 stars 20 forks source link

Amazon AWSSDK Runtime exception on Bridge Initilization #81

Open wolllis opened 1 year ago

wolllis commented 1 year ago

Affected worxlandroid Release: v3.4.1-beta Tested on OH Version: v3.4.2 & v3.4.4 Java Version: openjdk11-11.0.17+8.1_1 (Java Development Kit 11) System: FreeBSD 12.3 Jail (TrueNAS)

When the worxlandroid Bridge gets initilized the following error can be observed in the log file:

2023-05-10 13:07:46.670 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.worxlandroid.internal.WorxLandroidBridgeHandler@3fb32fb0': null
java.lang.ExceptionInInitializerError: null
        at software.amazon.awssdk.crt.CrtResource.<clinit>(CrtResource.java:104) ~[?:?]
        at org.openhab.binding.worxlandroid.internal.mqtt.AWSClient.createNewConnection(AWSClient.java:102) ~[?:?]
        at org.openhab.binding.worxlandroid.internal.mqtt.AWSClient.<init>(AWSClient.java:89) ~[?:?]
        at org.openhab.binding.worxlandroid.internal.WorxLandroidBridgeHandler.initialize(WorxLandroidBridgeHandler.java:140) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: software.amazon.awssdk.crt.CrtRuntimeException: software.amazon.awssdk.crt.CrtRuntimeException: Unable to unpack AWS CRT library UNKNOWN(-1)
        at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:255) ~[?:?]
        at software.amazon.awssdk.crt.CRT.<clinit>(CRT.java:35) ~[?:?]
        ... 13 more

This prevents the Bridge from getting initialized and ultimatively the binding from being usable.

Used Thing definition:

Bridge worxlandroid:worxlandroidBridge:MyWorxBridge "MyWorx Bridge" [ webapiUsername="xyz" , webapiPassword="xyz" ] 
{
    Thing mower xyz"Landroid M" [ refreshStatusInterval=300, pollingInterval=300 ]
}
sihui62 commented 1 year ago

[ refreshStatusInterval=300, pollingInterval=300 ]

You are missing a new config parameter:

https://github.com/nibi79/worxlandroid/issues/73#issuecomment-1507979728

https://github.com/nibi79/worxlandroid#binding-configuration

Autodiscover the Bridge, far easier than manual things config.

wolllis commented 1 year ago

Hello @sihui62,

You are missing a new config parameter:

thanks for the hint. Didn't know there was a change.

However, the issue still persists even after clearing the cache/temp folders and adding the mower via the OH Autodiscover Feature.

sihui62 commented 1 year ago

the issue still persists

Sorry, no more ideas.

nibi79 commented 1 year ago

Unable to unpack AWS CRT library UNKNOWN(-1)

May be something is wrong with your org.openhab.binding.worxlandroid-3.4.1.jar file or some system restrictions ? AWS libs are part of the org.openhab.binding.worxlandroid-3.4.1.jar