简体   繁体   English

调用云jclouds时出错

[英]Error calling to the cloud jclouds

So I am trying to download files on a rackspace server to my local server. 因此,我试图将机架服务器上的文件下载到本地服务器。 It is laid out here . 它布置在这里 For some odd reason, I am trying to make the initial call to the cloud and it is giving me some serious feedback. 出于某种奇怪的原因,我正在尝试向云进行初始调用,这给了我一些严肃的反馈。 No idea where to go from here. 不知道从这里去哪里。 I've tried all sorts of different Maven dependencies to fix the problem, but none have come close. 我已经尝试了各种不同的Maven依赖关系来解决此问题,但没有一个接近。 Am I overlooking something? 我在俯视什么吗? TIA! TIA!

My code: 我的代码:

public static void main (String[] args){

    CloudFilesApi cloudFilesApi = ContextBuilder.newBuilder(PROVIDER)
            .credentials(USERNAME, KEY)
            .buildApi(CloudFilesApi.class);


}

And here are my errors (without Guice): 这是我的错误(没有Guice):

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Stage
at org.jclouds.ContextBuilder.<clinit>(ContextBuilder.java:151)
at com.unidev.download.Main.main(Main.java:10)
Caused by: java.lang.ClassNotFoundException: com.google.inject.Stage
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 2 more

Here are my dependencies (now): 这是我的依赖项(现在):

<dependencies>
<!-- Rackspace US dependencies -->
<dependency>
  <groupId>org.apache.jclouds.provider</groupId>
  <artifactId>rackspace-cloudfiles-us</artifactId>
  <version>${jclouds.version}</version>
</dependency>

Code snippet for dependency tree(updated): https://codeshare.io/bfbKg 依赖关系树的代码片段(更新): https : //codeshare.io/bfbKg

I guess it is a Maven issue... When I was building the Maven project and using the dependencies via the pom file, it was somehow building incorrectly. 我想这是一个Maven问题...当我构建Maven项目并通过pom文件使用依赖项时,它以某种方式错误地构建。 Instead, I started a Java file and built a lib folder, pulled all the jars I needed and then just tied them in via the build path... and it is working well now... 相反,我启动了一个Java文件并建立了一个lib文件夹,拉出了我需要的所有jar,然后通过构建路径将它们捆绑在一起...现在运行良好...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jclouds Rackspace云文件服务网 - Jclouds Rackspace Cloud Files service net jclouds IOExpection:将请求主体写入服务器时出错 - jclouds IOExpection: Error writing request body to server jClouds Java应用程序可在Cloud服务之间复制,移动和删除文件 - jClouds Java app to copy, move, delete files between Cloud services Jclouds分段上传到Google Cloud Storage失败,出现400错误请求 - Jclouds multipart upload to Google Cloud Storage failing with 400 Bad Request Rackspace云文件(使用jclouds) - 如何获取容器位置 - Rackspace Cloud Files (using jclouds) - how to get container location 创建JClouds SwiftApi时出错:无法实例化提供程序org.jclouds.openstack.keystone.v2_0.KeystoneApiMetadata - Error creating JClouds SwiftApi: Provider org.jclouds.openstack.keystone.v2_0.KeystoneApiMetadata could not be instantiated 无法获取解决不完整的输出流错误jclouds - unable to get resolve Incomplete output stream error jclouds 在Spring MVC应用程序中使用jclouds创建BlobContext时出错 - Error creating BlobContext using jclouds in a Spring MVC application 登录jclouds仍会使用凭据将重试连接错误打印到控制台 - Logging in jclouds still prints retry connection error to console, with credentials 是否可以使用jclouds获取openstack云中可用的所有数据库服务器的列表? - is it possible to get a list of all database servers that are available in the openstack cloud using jclouds?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM