Return-Path: X-Original-To: apmail-jclouds-user-archive@minotaur.apache.org Delivered-To: apmail-jclouds-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02E0117750 for ; Tue, 14 Oct 2014 14:20:13 +0000 (UTC) Received: (qmail 26141 invoked by uid 500); 14 Oct 2014 14:20:12 -0000 Delivered-To: apmail-jclouds-user-archive@jclouds.apache.org Received: (qmail 26073 invoked by uid 500); 14 Oct 2014 14:20:12 -0000 Mailing-List: contact user-help@jclouds.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@jclouds.apache.org Delivered-To: mailing list user@jclouds.apache.org Received: (qmail 26061 invoked by uid 99); 14 Oct 2014 14:20:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2014 14:20:12 +0000 X-ASF-Spam-Status: No, hits=-2.0 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [147.102.222.185] (HELO smtp0.ntua.gr) (147.102.222.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2014 14:20:09 +0000 Received: from [IPv6:::1] ([IPv6:2001:648:2000:13:d598:5329:9d3c:417c]) (authenticated bits=0) by smtp0.ntua.gr (8.14.7/8.14.7) with ESMTP id s9EEJkDw061878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 14 Oct 2014 17:19:46 +0300 (EEST) (envelope-from gkousiou@mail.ntua.gr) Message-ID: <543D30FA.50201@mail.ntua.gr> Date: Tue, 14 Oct 2014 17:19:38 +0300 From: George Kousiouris User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: user@jclouds.apache.org Subject: Re: Unable to export running jar with Jclouds code from eclipse References: <543177C0.8060004@mail.ntua.gr> <20141006191352.owrwx980pw8s8wws@webmail.qrmedia.com> In-Reply-To: <20141006191352.owrwx980pw8s8wws@webmail.qrmedia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 141014-0, 10/14/2014), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org 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: gkousiou@mail.ntua.gr 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