Hi Vijay,
In your call "serverApi.create()", the second param's supposed to be the UUID
of the image, not the name as you have in your code (shown below).
ServerCreated servercreated =
serverApi.create("jclouds-server","cirrus-0.3.1-x86_64-usec","m1-tiny",n);
-Jeffrey
From: Vijay Sukthankar
<[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Date: Wednesday, March 19, 2014 6:16 PM
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Re: CreateServer()
Exception in thread "main" org.jclouds.http.HttpResponseException: command:
POST http://10.0.2.15:8774/v2/1d83ccc107c545f78c59c6580ba64367/servers HTTP/1.1
failed with response: HTTP/1.1 400 Bad Request; content: [{"badRequest":
{"message": "Invalid imageRef provided.", "code": 400}}]
at
org.jclouds.openstack.nova.v2_0.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:83)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:69)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:182)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:152)
at
org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(InvokeSyncToAsyncHttpMethod.java:133)
at
org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:99)
at
org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:60)
at
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:119)
at
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:70)
at sun.proxy.$Proxy74.create(Unknown Source)
at
JCloudsManualAuthentication.CreateServer(JCloudsManualAuthentication.java:163)
at JCloudsManualAuthentication.main(JCloudsManualAuthentication.java:61)
On Thu, Mar 20, 2014 at 7:31 AM, Andrew Phillips
<[email protected]<mailto:[email protected]>> wrote:
https://gist.github.com/vksuktha/9655554
Thanks for that...now please just add the actual exception you're getting (i.e.
the full stacktrace) ;-)
Regards
ap
--
Regards
Vijay Sukthankar