2016-05-04 78 views
0

我嘗試使用下面的代碼:類不能被發現

AmazonSQS amazonSqs = new AmazonSQSClient(new ClasspathPropertiesFileCredentialsProvider()); 

我有Java SDK的在我pom.xml文件:

<dependency> 
    <groupId>com.amazonaws</groupId> 
    <artifactId>aws-java-sdk</artifactId> 
    <version>LATEST</version> 
</dependency> 

但它贏得了」讓我建立我的Java應用程序,併產生以下錯誤:

Error creating bean with name 'videoTranscoderService' defined in file  
[XXX/VideoTranscoderService.class]: Instantiation 
of bean failed; nested exception is java.lang.NoClassDefFoundError: 
com/amazonaws/ClientConfigurationFactory: com.amazonaws.ClientConfigurationFactory 
-> [Help 1] 

我只是不明白它如何找不到類ClientConfigurationFactory,因爲它應該包含在Java SDK中嗎?我感謝你們可以幫助我解決這個問題!

回答

1

com.amazonaws.ClientConfigurationFactory在aws-java-sdk-core中,您需要將它添加到您的pom.xml中的依賴關係列表中