[英]java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.util.Base64
[英]java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.ClientConfiguration
使用此捆綁軟件-OSGI Server中的aws-java-sdk-osgi-1.11.26.jar
執行此操作時,將引發以下錯誤AmazonS3 s3 = new AmazonS3Client( credentials );
java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.ClientConfiguration
at com.amazonaws.ClientConfigurationFactory.getDefaultConfig(ClientConfigurationFactory.java:46)
at com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:36)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:440)
有解決方案嗎?
感謝所有建議
aws-java-sdk-osgi-1.11.26.jar的ClientConfiguration依賴於Jackson-databind.jar。Jackson-databind.jar依賴於Jackson-core.jar,因此它無法初始化ClientConfiguration。
添加了Import-Package從Jackson-databind-osgi.jar清單中的jackson-core-osgi.jar全部導入
然后問題解決了
注意:所有相關的jar都將轉換為OSGI jar並進行部署
我猜您在bundle Manifest中缺少Import-Package語句。 不確定如何構建捆綁包,但我建議以某種形式使用它。 例如,我通常使用在后台使用bnd的maven-bundle-plugin。 在大多數情況下,Bnd都能自動計算出進口量。
就我而言,重新啟動flink群集可以解決此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.