Exception: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/AWSCRT_3245581712843
My team is following the sample basic connect/pub-sub code samples provided by the SDK samples to create a connection in order to migrate from SDK v1 -> v2 and continue publishing messages.
Previous version 1.3.9
com.amazonaws aws-iot-device-sdk-java 1.3.9 V2 version 1.11.0 software.amazon.awssdk.iotdevicesdk aws-iot-device-sdk 1.11.0On container startup the following exception is thrown when the application tries to start in a docker container (Alpine Linux 3.15)
{"time":"2023-01-16T09:50:05.086Z","level":"INFO","thread":"main","method":"logMessage","msg":"__Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.","logger":"ConditionEvaluationReportLoggingListener","exception":"","logger_name":"org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener"} {"time":"2023-01-16T09:50:05.299Z","level":"ERROR","thread":"main","method":"reportFailure","msg":"Application run failed","logger":"SpringApplication","exception":"org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messagePublisher' defined in URL [jar:file:/app/app.jar!/BOOT-INF/classes!/uk/co/argos/convenience/ccutils/iot/MessagePublisher.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [.MessagePublisher]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so)\n\tat org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)\n\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296)\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [iot.MessagePublisher]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so)\n\tat org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)\nCaused by: java.lang.UnsatisfiedLinkError: /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/AWSCRT_3245581712843744318libaws-crt-jni.so)\n\tat java.base/java.lang.ClassLoaderNativeLibrary.load0(Native Method)\n\tat java.base/java.lang.ClassLoader
NativeLibrary.load(ClassLoader.java:2445)\n","logger_name":"org.springframework.boot.SpringApplication"}
Can anyone assist with the root cause?