Hi all,
many thanks for your advice. At the moment as a bypass given that we
needed a fast local solution, we have exported the dependent projects as
a separate jar and added it directly in the build path of the project in
question.
We will follow your instructions for the final implementation.
many thank,
George
On 10/6/2014 8:13 PM, Andrew Phillips wrote:
java.util.NoSuchElementException: key [aws-ec2] not in the list of
providers or
apis: {}
at
org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:174)
Seems to be a classpath issue? Any hints?
The problem here is most likely related to ServiceLoader: jclouds uses
a META-INF/... file to determine the implementations of API/provider
metadata classes that are available.
If you create a "fat JAR", the default logic typically picks only
*one* of these files (or none of them), rather then merging them all,
which is what needs to be done. See [1] for some ways of achieving
this. If you're using Maven, there's also an example in
jclouds-examples [2].
Hope this helps!
ap
[1]
http://blog.xebia.com/2011/07/20/jar-with-deps-dont-like-meta-infservices/
[2]
https://github.com/jclouds/jclouds-examples/blob/master/compute-basics/src/main/assembly/jar-with-dependencies.xml
--
---------------------------
George Kousiouris, PhD
Electrical and Computer Engineer
Division of Communications,
Electronics and Information Engineering
School of Electrical and Computer Engineering
Tel: +30 210 772 2546
Mobile: +30 6939354121
Fax: +30 210 772 2569
Email: [email protected]
Site: http://users.ntua.gr/gkousiou/
National Technical University of Athens
9 Heroon Polytechniou str., 157 73 Zografou, Athens, Greece
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com