Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home for cloudfoundry.org
« Groups Home
Message from discussion troubles whan executing uploadApplication() operation

Received: by 10.182.164.40 with SMTP id yn8mr366644obb.13.1349468310585;
        Fri, 05 Oct 2012 13:18:30 -0700 (PDT)
X-BeenThere: vcap-...@cloudfoundry.org
Received: by 10.182.95.236 with SMTP id dn12ls4437863obb.6.gmail; Fri, 05 Oct
 2012 13:18:29 -0700 (PDT)
Received: by 10.182.221.97 with SMTP id qd1mr6509754obc.6.1349468309811;
        Fri, 05 Oct 2012 13:18:29 -0700 (PDT)
Received: by 10.182.221.97 with SMTP id qd1mr6509753obc.6.1349468309791;
        Fri, 05 Oct 2012 13:18:29 -0700 (PDT)
Return-Path: <midobl...@gmail.com>
Received: from mail-oa0-f41.google.com (mail-oa0-f41.google.com [209.85.219.41])
        by mx.google.com with ESMTPS id ks5si12266704obb.62.2012.10.05.13.18.29
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 05 Oct 2012 13:18:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of midobl...@gmail.com designates 209.85.219.41 as permitted sender) client-ip=209.85.219.41;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of midobl...@gmail.com designates 209.85.219.41 as permitted sender) smtp.mail=midobl...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-oa0-f41.google.com with SMTP id k14so2442251oag.0
        for <vcap-...@cloudfoundry.org>; Fri, 05 Oct 2012 13:18:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=FTgJJoIRH8Axu3WwIMRqD2Fit4PuZ4F3ihar+fLrqkA=;
        b=QgeXIo8vqJhI2TlXOtiLwdO4lif0R7x7lQov3VVbHS+MVOp3wAQgTyEm/5MjNokru8
         UOncioHOW5X2Jm7S22Le3+YjwO2g4jzX2hi0xUa2UzztLWvgNJvk7pHdCkhyJ0GbbS0C
         TEW1lkJBmARTIImOFzfIcYIzSzZymeEFhBJR9Zd2SAvl0J9WZOgUI6iq1TqHbAGg6fKZ
         cvx6h+NSSlHKuJjZxcL9m1xAlO/bd/E39M6LUk6/x2Xtf2fMeNobDkptNpftqJ+oHwyD
         HndpCEfK6RHL5rKoqCq9yZsnOTFTt7uKAGh5CSAqZvuiETuJRBtPCmU5Z46vXjVcQSMz
         YNiQ==
MIME-Version: 1.0
Received: by 10.60.14.198 with SMTP id r6mr7791739oec.115.1349468309550; Fri,
 05 Oct 2012 13:18:29 -0700 (PDT)
Received: by 10.76.144.131 with HTTP; Fri, 5 Oct 2012 13:18:29 -0700 (PDT)
In-Reply-To: <CAMZyAZfGCrTDFBT=ekO3wqy5NK8oPJ3q_OiQKQnueY9iKCu...@mail.gmail.com>
References: <c65ff45e-044a-487d-a892-f36eef7e4...@cloudfoundry.org>
	<CAMZyAZfGCrTDFBT=ekO3wqy5NK8oPJ3q_OiQKQnueY9iKCu...@mail.gmail.com>
Date: Fri, 5 Oct 2012 22:18:29 +0200
Message-ID: <CAER6+GjdCYdLBeqQNQFST3fG+YJHronQp-+dJrtoZ5mjjYG...@mail.gmail.com>
Subject: Re: [vcap-dev] troubles whan executing uploadApplication() operation
From: Mohamed Mohamed <midobl...@gmail.com>
To: vcap-...@cloudfoundry.org
Content-Type: multipart/alternative; boundary=e89a8fb1f72c39f69504cb5593d5

--e89a8fb1f72c39f69504cb5593d5
Content-Type: text/plain; charset=ISO-8859-1

thank you for your answer,
yes, all functions are working well when i use vmc (including upload), i
can target api.vcap.me and i can uplad application using vmc push.

Best

On Fri, Oct 5, 2012 at 9:00 PM, Pieter Noordhuis <pnoordh...@rbcon.com>wrote:

> Hi,
>
> Can you verify that the API endpoint on api.vcap.me is functional?
>
> You can test this using VMC. For instance:
>
> ```
> vmc target http://api.vcap.me/
> vmc info
> ```
>
> If this works, we know the endpoint should be work and we can
> investigate further.
>
> Cheers,
> Pieter
>
> On Fri, Oct 5, 2012 at 10:48 AM,  <glacia...@gmail.com> wrote:
> > Hi all,
> > Im already using the REST java client
> > (https://github.com/cloudfoundry/vcap-java-client/
> > ) to communicate with my local Cloud Foundry instance. I had no problems
> > with almost all the operations except the creation of applications
> operation
> > (createAndUploadApp(appName, filePath, serviceNames, appType, appMemory))
> > that causes the following Exception:
> >
> > org.springframework.web.client.RestTemplate handleResponseError
> > ATTENTION: PUT request for
> > "http://api.vcap.me/apps/helloServletnewM/application" resulted in 405
> (Not
> > Allowed); invoking error handler
> > Exception in thread "main"
> > org.cloudfoundry.client.lib.CloudFoundryException: 405 Not Allowed
> (Client
> > error)
> > at
> >
> org.cloudfoundry.client.lib.rest.AbstractCloudControllerClient$ErrorHandler.handleError(AbstractCloudControllerClient.java:224)
> > at
> >
> org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
> > at
> >
> org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
> > at
> >
> org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401)
> > at org.springframework.web.client.RestTemplate.put(RestTemplate.java:327)
> > at
> >
> org.cloudfoundry.client.lib.rest.CloudControllerClientV1.uploadApplication(CloudControllerClientV1.java:313)
> > at
> >
> org.cloudfoundry.client.lib.rest.CloudControllerClientV1.doUploadApplicationFolder(CloudControllerClientV1.java:486)
> > at
> >
> org.cloudfoundry.client.lib.rest.CloudControllerClientV1.uploadApplication(CloudControllerClientV1.java:290)
> > at
> >
> org.cloudfoundry.client.lib.CloudFoundryClient.uploadApplication(CloudFoundryClient.java:181)
> > at
> >
> tests.samir.ClientTestWithoutJunit.createAndUploadApp(ClientTestWithoutJunit.java:159)
> > at tests.samir.Main.main(Main.java:33)
> >
> > I tried to execute this on cloudfoundry.com and it works perfectly.
> >
> > Does any one have an idea how to bypass this problem?
> >
> > Thanking you in advance for your response.
> >
> > Best,
>

--e89a8fb1f72c39f69504cb5593d5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

thank you for your answer,<br>yes, all functions are working well when i us=
e vmc (including upload), i can target <a href=3D"http://api.vcap.me">api.v=
cap.me</a> and i can uplad application using vmc push. <br><br>Best<br><br>
<div class=3D"gmail_quote">On Fri, Oct 5, 2012 at 9:00 PM, Pieter Noordhuis=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:pnoordh...@rbcon.com" target=3D"_b=
lank">pnoordh...@rbcon.com</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">
Hi,<br>
<br>
Can you verify that the API endpoint on <a href=3D"http://api.vcap.me" targ=
et=3D"_blank">api.vcap.me</a> is functional?<br>
<br>
You can test this using VMC. For instance:<br>
<br>
```<br>
vmc target <a href=3D"http://api.vcap.me/" target=3D"_blank">http://api.vca=
p.me/</a><br>
vmc info<br>
```<br>
<br>
If this works, we know the endpoint should be work and we can<br>
investigate further.<br>
<br>
Cheers,<br>
Pieter<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
On Fri, Oct 5, 2012 at 10:48 AM, =A0&lt;<a href=3D"mailto:glacia...@gmail.c=
om">glacia...@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt; Im already using the REST java client<br>
&gt; (<a href=3D"https://github.com/cloudfoundry/vcap-java-client/" target=
=3D"_blank">https://github.com/cloudfoundry/vcap-java-client/</a><br>
&gt; ) to communicate with my local Cloud Foundry instance. I had no proble=
ms<br>
&gt; with almost all the operations except the creation of applications ope=
ration<br>
&gt; (createAndUploadApp(appName, filePath, serviceNames, appType, appMemor=
y))<br>
&gt; that causes the following Exception:<br>
&gt;<br>
&gt; org.springframework.web.client.RestTemplate handleResponseError<br>
&gt; ATTENTION: PUT request for<br>
&gt; &quot;<a href=3D"http://api.vcap.me/apps/helloServletnewM/application"=
 target=3D"_blank">http://api.vcap.me/apps/helloServletnewM/application</a>=
&quot; resulted in 405 (Not<br>
&gt; Allowed); invoking error handler<br>
&gt; Exception in thread &quot;main&quot;<br>
&gt; org.cloudfoundry.client.lib.CloudFoundryException: 405 Not Allowed (Cl=
ient<br>
&gt; error)<br>
&gt; at<br>
&gt; org.cloudfoundry.client.lib.rest.AbstractCloudControllerClient$ErrorHa=
ndler.handleError(AbstractCloudControllerClient.java:224)<br>
&gt; at<br>
&gt; org.springframework.web.client.RestTemplate.handleResponseError(RestTe=
mplate.java:486)<br>
&gt; at<br>
&gt; org.springframework.web.client.RestTemplate.doExecute(RestTemplate.jav=
a:443)<br>
&gt; at<br>
&gt; org.springframework.web.client.RestTemplate.execute(RestTemplate.java:=
401)<br>
&gt; at org.springframework.web.client.RestTemplate.put(RestTemplate.java:3=
27)<br>
&gt; at<br>
&gt; org.cloudfoundry.client.lib.rest.CloudControllerClientV1.uploadApplica=
tion(CloudControllerClientV1.java:313)<br>
&gt; at<br>
&gt; org.cloudfoundry.client.lib.rest.CloudControllerClientV1.doUploadAppli=
cationFolder(CloudControllerClientV1.java:486)<br>
&gt; at<br>
&gt; org.cloudfoundry.client.lib.rest.CloudControllerClientV1.uploadApplica=
tion(CloudControllerClientV1.java:290)<br>
&gt; at<br>
&gt; org.cloudfoundry.client.lib.CloudFoundryClient.uploadApplication(Cloud=
FoundryClient.java:181)<br>
&gt; at<br>
&gt; tests.samir.ClientTestWithoutJunit.createAndUploadApp(ClientTestWithou=
tJunit.java:159)<br>
&gt; at tests.samir.Main.main(Main.java:33)<br>
&gt;<br>
&gt; I tried to execute this on <a href=3D"http://cloudfoundry.com" target=
=3D"_blank">cloudfoundry.com</a> and it works perfectly.<br>
&gt;<br>
&gt; Does any one have an idea how to bypass this problem?<br>
&gt;<br>
&gt; Thanking you in advance for your response.<br>
&gt;<br>
&gt; Best,<br>
</div></div></blockquote></div><br>

--e89a8fb1f72c39f69504cb5593d5--