Cannot decrypt returned value with same key and alogirthm

I have a simple java program which encrypts some plaintext using Azure KeyVault and then decrypts it.
However the decrypt always fails with {"error":{"code":"BadParameter","message":"Request body not specified"}}
Here is the java test class
package uk.co.his.azure.keyvault.test;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.InputStreamEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import us.monoid.json.JSONException;
import us.monoid.json.JSONObject;
import com.microsoft.aad.adal4j.AuthenticationContext;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.aad.adal4j.ClientCredential;
public class CopyOfTestClientLogon {
public final static String AAD_HOST_NAME = "login.windows.net";
public final static String AAD_TENANT_NAME = "From Azure portal ActiveDirectory app page endpoints";
public final static String AAD_TENANT_ENDPOINT = "https://" + AAD_HOST_NAME
+ "/" + AAD_TENANT_NAME + "/";
public final static String AAD_CLIENT_ID = "From Azure portal ActiveDirectory app page";
public final static String AAD_CLIENT_SECRET = "Copied From Portal";
public final static String KEY_NAME = "TestKey1";
private static final ContentType JsonContentType = ContentType.parse("application/json");
private static final String KEY_ENCRYPT_ALG = "RSA1_5";
@Test
public void testEncryptWithKey() throws InterruptedException, ExecutionException, JSONException, URISyntaxException, ClientProtocolException, IOException
AuthenticationContext ctx = new AuthenticationContext(AAD_TENANT_ENDPOINT, true, Executors.newFixedThreadPool(1));
Future<AuthenticationResult> resp = ctx.acquireToken("https://vault.azure.net", new ClientCredential(AAD_CLIENT_ID, AAD_CLIENT_SECRET), null);
AuthenticationResult res = resp.get();
String plainText = "This is a test";
String plainTextB64Encoded = Base64.encodeBase64URLSafeString(plainText.getBytes("UTF-8"));
JSONObject req = new JSONObject();
req.put("alg", KEY_ENCRYPT_ALG);
req.put("value", plainTextB64Encoded);
byte[] payload = req.toString().getBytes("UTF-8");
ByteArrayInputStream message = new ByteArrayInputStream(req.toString().getBytes("UTF-8"));
InputStreamEntity reqEntity = new InputStreamEntity(message, payload.length, JsonContentType);
reqEntity.setChunked(true);
URIBuilder ub = new URIBuilder(
"https://aexpress-dev1-key-vault.vault.azure.net/keys/"+KEY_NAME+"/encrypt?api-version=2014-12-08-preview");
URI uri = ub.build();
HttpUriRequest request = RequestBuilder.post().setUri(uri)
.setHeader(HttpHeaders.AUTHORIZATION, "Bearer "+res.getAccessToken())
.setEntity(reqEntity).build();
HttpClient client = HttpClientBuilder.create().build(); // TODO server
// cert
// authentication
HttpResponse response = client.execute(request);
int status = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
String body = null;
if(entity==null) {
System.err.println("No body");
throw new ClientProtocolException("Response has no body");
else {
body = EntityUtils.toString(entity);
JSONObject reply = new JSONObject(body);
String encryptedText = reply.getString("value");
entity.getContent().close();
req = new JSONObject();
req.put("alg", KEY_ENCRYPT_ALG);
req.put("value", encryptedText);
payload = req.toString().getBytes("UTF-8");
System.out.println("Payload is "+req.toString()+" "+payload.length);
message = new ByteArrayInputStream(payload);
reqEntity = new InputStreamEntity(message, -1, JsonContentType);
reqEntity.setChunked(true);
ub = new URIBuilder(
"https://aexpress-dev1-key-vault.vault.azure.net/keys/"+KEY_NAME+"/decrypt?api-version=2014-12-08-preview");
uri = ub.build();
request = RequestBuilder.post().setUri(uri)
.setHeader(HttpHeaders.AUTHORIZATION, "Bearer "+res.getAccessToken())
.setEntity(reqEntity).build();
response = client.execute(request);
status = response.getStatusLine().getStatusCode();
entity = response.getEntity();
body = null;
if(entity==null) {
System.err.println("No body");
throw new ClientProtocolException("Response has no body");
else {
body = EntityUtils.toString(entity);
The output from the Apache Http Client is
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2015/04/09 17:16:40:939 BST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2015/04/09 17:16:40:970 BST [DEBUG] RequestAuthCache - Auth cache not set in the context
2015/04/09 17:16:40:970 BST [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
2015/04/09 17:16:41:002 BST [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2015/04/09 17:16:41:002 BST [DEBUG] MainClientExec - Opening connection {s}->https://aexpress-dev1-key-vault.vault.azure.net:443
2015/04/09 17:16:41:143 BST [DEBUG] HttpClientConnectionOperator - Connecting to aexpress-dev1-key-vault.vault.azure.net/191.235.161.98:443
2015/04/09 17:16:41:268 BST [DEBUG] HttpClientConnectionOperator - Connection established 192.168.0.216:57719<->191.235.161.98:443
2015/04/09 17:16:41:268 BST [DEBUG] MainClientExec - Executing request POST /keys/TestKey1/encrypt?api-version=2014-12-08-preview HTTP/1.1
2015/04/09 17:16:41:268 BST [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> POST /keys/TestKey1/encrypt?api-version=2014-12-08-preview HTTP/1.1
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Authorization: Bearer .... snip ... a real bearer code
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Transfer-Encoding: chunked
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Content-Type: application/json
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Host: aexpress-dev1-key-vault.vault.azure.net
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Connection: Keep-Alive
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.3.6 (java 1.5)
2015/04/09 17:16:41:284 BST [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "POST /keys/TestKey1/encrypt?api-version=2014-12-08-preview HTTP/1.1[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Authorization: Bearer .... snip ... a real bearer code[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Transfer-Encoding: chunked[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Content-Type: application/json[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Host: aexpress-dev1-key-vault.vault.azure.net[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "2e[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "{"alg":"RSA1_5","value":"VGhpcyBpcyBhIHRlc3Q"}[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "0[\r][\n]"
2015/04/09 17:16:41:284 BST [DEBUG] wire - http-outgoing-0 >> "[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "Cache-Control: no-cache[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "Content-Type: application/json; charset=utf-8[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "Expires: -1[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "Server: Microsoft-IIS/8.5[\r][\n]"
2015/04/09 17:16:41:346 BST [DEBUG] wire - http-outgoing-0 << "x-ms-keyvault-service-version: 1.0.0.82[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "X-AspNet-Version: 4.0.30319[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "X-Powered-By: ASP.NET[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000;includeSubDomains[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "Date: Thu, 09 Apr 2015 16:16:41 GMT[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "Content-Length: 457[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "[\r][\n]"
2015/04/09 17:16:41:362 BST [DEBUG] wire - http-outgoing-0 << "{"kid":"https://aexpress-dev1-key-vault.vault.azure.net/keys/TestKey1/a23c0f08a4ef453ba8f2ab80c468e8ae","value":"m575654yUIZNml4-pBjL2hBZEdhr8P11uAbylFpMEO-7RQA7L-WpyDq2WV5YjDPHtnGNrMZb-rOyw-vC1uh9_WlhhA3wdlYaRohj_OMFZTzzLR3Zt0Sc7egIGoIqdoJBgu-INh2rV2GuwmBd9jthSuVnp_qyVfOJsDXrCvsrgjT0aLBHa3QX54G75GzzuV1bE351YRC9klj8C1bg19Qd_BiZ_b9B0eGXBKBNmDbR2-AjfxUhlMALVWROTDTeABW60cs4ZMqi5HnQYyKulKK5CyvZD0lYmQH54PPWjIFuC__xkPF8_0W4Z3Ri8Nz4616LosKWL7EQjR87lZAwF9Ypdw"}"
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << HTTP/1.1 200 OK
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Cache-Control: no-cache
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Pragma: no-cache
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Content-Type: application/json; charset=utf-8
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Expires: -1
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Server: Microsoft-IIS/8.5
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << x-ms-keyvault-service-version: 1.0.0.82
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << X-AspNet-Version: 4.0.30319
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << X-Powered-By: ASP.NET
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000;includeSubDomains
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Date: Thu, 09 Apr 2015 16:16:41 GMT
2015/04/09 17:16:41:362 BST [DEBUG] headers - http-outgoing-0 << Content-Length: 457
2015/04/09 17:16:41:362 BST [DEBUG] MainClientExec - Connection can be kept alive indefinitely
2015/04/09 17:16:41:362 BST [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443] can be kept alive indefinitely
2015/04/09 17:16:41:362 BST [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2015/04/09 17:16:41:377 BST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2015/04/09 17:16:41:377 BST [DEBUG] RequestAuthCache - Auth cache not set in the context
2015/04/09 17:16:41:377 BST [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2015/04/09 17:16:41:377 BST [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2015/04/09 17:16:41:377 BST [DEBUG] MainClientExec - Stale connection check
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 << "[read] I/O error: Read timed out"
2015/04/09 17:16:41:393 BST [DEBUG] MainClientExec - Executing request POST /keys/TestKey1/decrypt?api-version=2014-12-08-preview HTTP/1.1
2015/04/09 17:16:41:393 BST [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> POST /keys/TestKey1/decrypt?api-version=2014-12-08-preview HTTP/1.1
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Authorization: Bearer .... snip ... a real bearer code
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Transfer-Encoding: chunked
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Content-Type: application/json
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Host: aexpress-dev1-key-vault.vault.azure.net
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Connection: Keep-Alive
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.3.6 (java 1.5)
2015/04/09 17:16:41:393 BST [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "POST /keys/TestKey1/decrypt?api-version=2014-12-08-preview HTTP/1.1[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Authorization: Bearer .... snip ... a real bearer code[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Transfer-Encoding: chunked[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Content-Type: application/json[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Host: aexpress-dev1-key-vault.vault.azure.net[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.3.6 (java 1.5)[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "171[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "{"alg":"RSA1_5","value":"m575654yUIZNml4-pBjL2hBZEdhr8P11uAbylFpMEO-7RQA7L-WpyDq2WV5YjDPHtnGNrMZb-rOyw-vC1uh9_WlhhA3wdlYaRohj_OMFZTzzLR3Zt0Sc7egIGoIqdoJBgu-INh2rV2GuwmBd9jthSuVnp_qyVfOJsDXrCvsrgjT0aLBHa3QX54G75GzzuV1bE351YRC9klj8C1bg19Qd_BiZ_b9B0eGXBKBNmDbR2-AjfxUhlMALVWROTDTeABW60cs4ZMqi5HnQYyKulKK5CyvZD0lYmQH54PPWjIFuC__xkPF8_0W4Z3Ri8Nz4616LosKWL7EQjR87lZAwF9Ypdw"}[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "0[\r][\n]"
2015/04/09 17:16:41:393 BST [DEBUG] wire - http-outgoing-0 >> "[\r][\n]"
Payload is {"alg":"RSA1_5","value":"m575654yUIZNml4-pBjL2hBZEdhr8P11uAbylFpMEO-7RQA7L-WpyDq2WV5YjDPHtnGNrMZb-rOyw-vC1uh9_WlhhA3wdlYaRohj_OMFZTzzLR3Zt0Sc7egIGoIqdoJBgu-INh2rV2GuwmBd9jthSuVnp_qyVfOJsDXrCvsrgjT0aLBHa3QX54G75GzzuV1bE351YRC9klj8C1bg19Qd_BiZ_b9B0eGXBKBNmDbR2-AjfxUhlMALVWROTDTeABW60cs4ZMqi5HnQYyKulKK5CyvZD0lYmQH54PPWjIFuC__xkPF8_0W4Z3Ri8Nz4616LosKWL7EQjR87lZAwF9Ypdw"} 369
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "HTTP/1.1 400 Bad Request[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Cache-Control: no-cache[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Content-Length: 72[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Content-Type: application/json; charset=utf-8[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Expires: -1[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Server: Microsoft-IIS/8.5[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "x-ms-keyvault-service-version: 1.0.0.82[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "X-AspNet-Version: 4.0.30319[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "X-Powered-By: ASP.NET[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Strict-Transport-Security: max-age=31536000;includeSubDomains[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "Date: Thu, 09 Apr 2015 16:16:41 GMT[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "[\r][\n]"
2015/04/09 17:16:41:459 BST [DEBUG] wire - http-outgoing-0 << "{"error":{"code":"BadParameter","message":"Request body not specified"}}"
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << HTTP/1.1 400 Bad Request
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Cache-Control: no-cache
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Pragma: no-cache
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Content-Length: 72
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Content-Type: application/json; charset=utf-8
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Expires: -1
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Server: Microsoft-IIS/8.5
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << x-ms-keyvault-service-version: 1.0.0.82
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << X-AspNet-Version: 4.0.30319
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << X-Powered-By: ASP.NET
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Strict-Transport-Security: max-age=31536000;includeSubDomains
2015/04/09 17:16:41:459 BST [DEBUG] headers - http-outgoing-0 << Date: Thu, 09 Apr 2015 16:16:41 GMT
2015/04/09 17:16:41:459 BST [DEBUG] MainClientExec - Connection can be kept alive indefinitely
400
2015/04/09 17:16:41:459 BST [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443] can be kept alive indefinitely
2015/04/09 17:16:41:459 BST [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://aexpress-dev1-key-vault.vault.azure.net:443][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]

The problem was that the decrypt request does not like transfer encoding chunked and requires the Content length;
reqEntity = new InputStreamEntity(message, -1, JsonContentType);
reqEntity.setChunked(true);
Should have been
reqEntity = new InputStreamEntity(message, payload.length, JsonContentType);
reqEntity.setChunked(false);
For more see Stackoverflow answer to same question

Similar Messages

  • Create a different db with same db_name and now cannot start apex

    Hi All
    we create a db in the same box with my old db.
    The purpose is we need to change the default character set to unicode.
    And How do we start apex?
    Is there a command line tool to start apex?
    -Thanks for the help!

    Hi umesh,
    Thanks for your help.
    That means we can set up two database with same db_name and domain is system. the duplicate DB (second DB) does not affect primary DB in system and makes a confusion for client application? suppose i use TNS to control each DB by IP .
    also, can we use db_link to link two differnet OS plastform( window 32 bit and linuc 64 bit redhat with service name) oacle version is 10 g too?
    I try to configure a TNS in primary DB tnaname file but fail with TNS : no listener ora-12541 during connect linux DB server.
    But I copy this TNS to new window 32 bit PC with oracle client. it works to link to linux db services.
    which issue?
    Thnak for help
    JIM
    Edited by: user589812 on Jul 3, 2009 9:00 AM

  • Two records with same  key (Infocube)

    Hi,
    I was trying to do, in a update rule, an "IF" condition with two key figures.
    IF Kf1 > Kf2. result = Kf1 else result = Kf2.
    But the data in the source (datamart Infocube to infocube) have tow records with the same characteristics combination (the same keys)and different amount in the keyfigures, then the result of my "if" condition is not the expected because I understood in the infocube only exists one characteristics combination. :S
    I was seeing those records in the manage transaction of the infocube.
    Some reason for this?
    Thanks and regards
    Victoria Leó

    This can happen with parallel loads.  Two rows with same set of Char values but in different packets of the same Request, being loaded at the same time.
    It really shouldn't be an issue - your update rule will make the KF change as desired.  Your queries aggregate KFs based characteristic values, not Dim IDs, so you'll get the totals you expect.
    Here's some more info:
    There is an RSRV Test that lets you check a dimension for a cube to see if multiple DIM IDs exist for the same combination of Chars - <b>Multiple Entries in Dimensions of a (Basis) InfoCube</b>
    Output looks like:
    12:02:24 o'clock on 08/25/2006: Start test run for user PIZZAMAN:)
    Dimension ZFM_C521: DIMID 61,215 and 61,214 have same characteristic values
    Dimension ZFM_C521: DIMID 61,880 and 61,879 have same characteristic values
    Dimension ZFM_C521: DIMID 61,366 and 61,365 have same characteristic values
    Dimension ZFM_C521: DIMID 61,368 and 61,367 have same characteristic values
    12:02:24 on 08/25/2006: Test run for user PIZZAMAN:) completed
    You can run the Correct Error option to have it update fact rows to use one of the DimIDs if you want, but unless you have lots of them, I even wouldn't bother.
    Here's the description of the test:
    <u>Description</u>
    This elementary test recognizes whether there are several lines that have different DIMIDs(dimension table key), but have the same SIDs for the selected dimension table for the InfoCube specified. (This can occur by using parallel loading jobs). This has nothing to do with an inconsistency. However, unnecessary storage space is occupied in the database.
    <u>Repairs</u>
    Since the different DIMIDs with the same SIDs are normally used in the fact tables, they cannot simply be deleted. Therefore, all of the different DIMIDS in the fact tables are replaced by one DIMID that is randomly selected from the equivalent ones. Before a change can be made to the database, the consent of the user is requested.
    DIMIDs that have become unnecessary are deleted in the connection. In doing so, not only are the DIMDs deleted that were released in the first part of the repair, but so are all of those that are no longer used in the fact tables (including aggregates). The consent of the user is again requested before this change is made.

  • Unique data record means you can't  update a record from ECC with same key.

    Unique data record means you can't  update a record from ECC with same key fileds right?
    Details: For example i have two requests Req1 and Req2 in DSO with unique data record setting checked. on day one Req1 has a filed quantity with value 10 in Active data table. On day two Req1 can not be overwitten from ECC with Req2 with the same key fields but different value 20 in the filed quantity because of the Unique data record settings. finally the delta load fails from ECC going to DSO because of this setting. is it right?
    I think we can only use unique record setting going from DSO to cube right?
    Please give me a simple scenario in which we can use this setting.
    I already search the threads and will assign points only to valuable information.
    Thanks in advance.
    York

    Hi Les,
    Unique Data Records:
    With the Unique Data Records indicator, you determine whether only unique data records are to be updated to the ODS object. This means that you cannot load a data record into the ODS object the key combination for which already exists in the system – otherwise a termination occurs. Only use this setting when you are sure that only unique data records are to be loaded into the ODS object (for example, single documents). A typical application of this is in the loading of mass data. It improves the load performance.
    Hope it Helps
    Srini

  • Subprocess 33 was not successful. Master cannot read return value from S 33

    Hi All,
    We are on BI 7.0 SP 19.
    We have submitted a planning sequence in the background with automatic packaging.
    The planning sequence has two steps:
    Step 1. Z_PLNG_FUNCTION1
    Step 2. Z_PLNG_FUNCTION2
    As per automatic packaging, the system chose 0ACCOUNT for packaging.
    When submitted, each step has been submitted to 30 packages as 30 subprocesses.
    For Step 1, the log shows that All subprocesses  executed.
    For Step 2, the log shows that the subprocess 33 and 58 failed, which means subprocess #3, and # 28 for the step 2 as the subprocess is numbered in the log in combination with step 1.
    The messages in the log for the failed subprocesses are as follows:
    @5C\QError@     Subprocess 33 was not successful
    @5C\QError@     Master cannot read return value from subprocess 33
    @5C\QError@     Subprocess 58 was not successful
    @5C\QError@     Master cannot read return value from subprocess 58
    Our question is on how to find the exact cause of the subprocess failure.
    I tried to look for the details on the error messages, they have been not helpful.
    What is meant by 'Master cannot read return value from subprocess' and how to get the exact cause of the failure?
    Thanks in advance,
    Best Regards,
    - Shashi

    Shashi,
    implement the following notes and check again:1368659, 1525723, 1532061.
    Regards,
    Marc
    SAP Techology RIG

  • Set JArray values with invalid key value: "LastUpdatedTime" on new alert rule creation

    Hey all!
    I'm trying to create a new alert rule using version 0.9.11 of the Monitoring Library and am getting this error on alertsClient.rules.CreateOrUpdate:
    "Set JArray values with invalid key value: "LastUpdatedTime". Array position index expected."
    That's interesting because LastUpdatedTime is a DateTime object, and whether I set it or I don't, if I set a breakpoint, it does set itself correctly, but the API appears to be expecting a JSON hash?
    I've tested alertsClient and I'm able to get existing alerts (also metrics with metrics client), so I don't believe it's an access issue.
    Any ideas?
    The full code I'm using for the test (borrowed virtually verbatim from the Cloud Cover video
    here): 
    Rule newRule = new Rule
        Name = "CPU Over 90%",
        Id = Guid.NewGuid().ToString(),
        Description = "CPU Has been over 90% for 5 minutes",
        IsEnabled = true,
        LastUpdatedTime = DateTime.Now,
        Condition = new ThresholdRuleCondition
            Operator = Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ConditionOperator.GreaterThan,
            Threshold = 90,
            WindowSize = TimeSpan.FromMinutes(5),
            DataSource = new RuleMetricDataSource
                MetricName = "Percentage CPU",
                ResourceId = "",
                MetricNamespace = ResourceIdBuilder.BuildCloudServiceResourceId(<cloudservicename>, <deploymentname>)
    RuleAction action = new RuleEmailAction
        SendToServiceOwners = true,
    newRule.Actions.Add(action);
    OperationResponse alertResponse = alertsClient.Rules.CreateOrUpdate(new
    RuleCreateOrUpdateParameters { Rule = newRule });
    Console.WriteLine("Create alert rule response: " + alertResponse.StatusCode);

    Hi Greg,
    Thanks for your post!
    Error "JArray" has been fixed in the latest nugget package.
    Refer to:
    http://www.nuget.org/packages/Microsoft.WindowsAzure.Management.Monitoring/
    Hope this helps!
    Regards,
    Sadiqh

  • Error Record with Same Key

    Can anyone help me out with a master data load failure.
    My request goes off red and the message looks somehow like "Record filtered in advance as error records with the same key exist", "Filter out new records with same key". I have already checked the duplicate handle record setting in DTP. Still why am i getting this error.
    Would appreciate if some one could suggest me in this.

    Hello Shridevi M ,
    When I execute my DTP, I get a master data load failure : "Record filtered in advance as error records with the same key exist" . It's the same as you get. Please tell me how did you solved this probelm?
    Thanks in advance,
    Abdellatif

  • Send 837, 276 & 270 to same Trading Partner with Same Receiver and Submitter ID

    Hi,
    I am trying to send different EDI to same Trading partners using same Receiver and Submitter Identifiers, but for different ISA15 and GS8.
    When I tried to add another Agreement using same identifiers, BizTalk throws errors 
    Cannot save changes as it will result in two oneway agreements in agreements [Agreement_837] and [Agreement_276] to have same sender and receiver identities [ZZ:SenderID] [ZZ:ReceiverID]. (Microsoft.BizTalk.B2B.PartnerManagement)
    I thought of using dummy ID and change it in Send Pipeline component with same Submitter and Receiver ID. But seems its a BAD idea. Is there anything I missed ?
    Any suggestions / help is highly appreciated. Please help
    Thanks,
    harry
    BizTalk Developer

    You should be able to set GS08 on the Envelopers section of the You->Them tab of the agreement.  You can set per transaction.
    Unfortunately, ISA 15 is an Agreement level option and as you've seen, a unique sender/receiver combination is required.
    I recommend setting EdiOverride.ISA15 in either an Orchestration or Pipeline Component for the transactions you want different from the Agreement ('T' I'd presume).
    EdiOverride:
    http://msdn.microsoft.com/en-us/library/dd223988.aspx

  • HT4352 problem sharing iTunes with new Apple TV.(model MD199LL/A. I have iTunes and Apple TV set up with same address and passwords, enabled iTunes and Apple TV for home sharing and still nothing? I have latest iTunes and Apple TV update. Any other sugges

    Have a problem with Home Sharing with Apple TV and iTunes. Have latest iTunes and Apple TV downloads. Have both items set up for home sharing with same address and passwords. AppleTV running fine for everything else. FYI, my library is about 60gigs. AppleTV model is MD199LL/A if that matters. Really want to hear my entire music library and not just Purchased items. Thanks for any help!!!

    I have an older PC with Windows XP Professional on it. I updated to the latest iTunes and I am able to access the photos, etc. on it. However, my Windows 7 PC still does work (since last Apple TV update). Apple TV does not recognize that Home Sharing is turned here. The latter PC has all my current photos on it which I would like share with others on my Apple TV. A fix would be appreciated.

  • I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated.

    I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated. Heres an image of before and after. The first image I use is a JPG 72dpi 1500px x1500px and I want to downsize it to 600x600px same res, but it keeps pixelating, this has never happened before. Any suggestions, thoughts?
    thanks!

    I wouldn't say pixelated; more like blurry.
    Like ConnectedCreative said, what steps are you using? Are you using "bicubic sharper" when resizing down?

  • Database restore with same SID and different schema owner

    Dear all,
    I have quality system on HP-UX oracle platform which has been upgraded from 4.6C to ECC 5.0
    and schema owner for the database is still SAPR3
    I have installed new Test system with version ECC 5.0 with same SID and now i need to refresh its database with Data from QAS system ... owner at Test system is SAPC11 which is new installation ECC 5.0 and where SID is C11.
    I need to know once i restore data what steps i need to carry out at Test system
    i.e like change ENV settings from SAPC11 to SAPR3.
    Please note SID is same on both hosts. and owner is different SAPR3 and SAPC11
    Regards,
    RR

    Dear all ,
    Thanks for your views . but i have already installed ECC 5.0 on
    target machine with schema owner as default SAPC11 (sid)
    Is there any other way out ... instead of doing reinstallation with schema owner SAPR3 / instead of doing Export-Import system copy method which again is as good as reinstallation.
    I would like to have your views on following ,
    when i will restore database from source to taget
    al tables in target machine will be having owner as SAPR3 ( which came from source ) ...but my DB owner at Target machine is SAPC11 ( as far as ENV and all profiles are concerned ) .... cant i use SAPR3 user which got restored with backup of source to target to start my instance at Target machine... may be by changing ENV settings.
    I really appreciate and thank you in adavance for sharing your views.
    Regards,
    RR

  • My little cousin scratched my i tunes gift card with a key and now I am not able to decipher the entire code. Is there any way of still being able to redeem my i tunes gift card?

    My little cousin scratched my i tunes gift card with a key and now I am not able to decipher the code on the back. Is there any way of still being able to redeem the gift card?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes forums.
    Answering quickly, though, see:
    http://support.apple.com/kb/TS1292
    Regards.

  • Why my MacBook pro with Maverick, when I'm connected with internet key and connect with usb cable my HTC One the Mac restat with error?

    Why my MacBook pro with Maverick, when I'm connected with internet key and connect with usb cable my HTC One the Mac restat with error?

    Solution may be found if you search in the "More Like This" section over in the right column. 

  • How Can I install Framemaker 10 silently with serial key and license updater?

    How Can I install Framemaker 10 silently with serial key and license updater? Is there any tool to create MSI for this?
    I tried with using http://download.macromedia.com/pub/developer/creativesuite/AAMEE/win32/ApplicationManagerE nterprise_1_all.exe and its not supporting.
    I am looking for any customization tool for Framemaker 10 from Adobe or else silent install with serial and license updater

    After creating "application.xml.override" from above link
    First after installing manually Adobe Framemaker 10,Copy "pcd.db" to your source folder from "%ProgramFiles(x86)%\Common Files\Adobe\Adobe PCD\" once you run "LicenseUpdater.exe"
    1) For install create batch file "install.bat" and copy below command
    @echo off
    REM =====Install script=====
    set Current=%~dp0
    "%Current%Set-up.exe" --mode=silent --deploymentFile="%Current%\deploy\AdobeFrameMaker10_en_US.install.xml" --overrideFile="%Current%\deploy\application.xml.override" --acton=install
    COPY /Y "%Current%pcd.db" "%ProgramFiles(x86)%\Common Files\Adobe\Adobe PCD\pcd.db"
    Exit 0
    2) For Uninstall
    * download Adobeairinstaller from Adobe - Adobe AIR to uninstall adobe AIR silently and copy this exe in source folder
    Create batch file to uninstall Framemaker 10 "Uninstall.bat" and copy below command to Uninstall
    @echo off
    REM =====Uninstall script=====
    set Current=%~dp0
    REM Uninstalling "Adobe Framemaker 10"
    "%Current%Set-up.exe" --mode=silent --deploymentFile="%Current%\deploy\AdobeFrameMaker10_en_US.remove.xml" --overrideFile="%Current%\deploy\application.xml.override" --acton=uninstall
    DEL /F /Q "%ProgramFiles(x86)%\Common Files\Adobe\Adobe PCD\pcd.db"
    REM Uninstalling Adobe community help
    msiexec /x {E2B04924-29F3-F49D-71E9-B90EFEDE282C} /qn
    REM Uninstalling Adobe PDF creation Add-On 9
    msiexec /x {AC76D478-1033-0000-3478-000000000004} /qn
    REM Uninstalling Adobe AIR
    "%Current%AdobeAIRInstaller.exe" -uninstall
    Exit 0
    I think this will help....

  • HT201253 I cannot sync my 5S with ITunes.  I can sync my iPad with same cord and computer

    I recently sent my 5S through the washing machine and got a replacement 5S.  I am running Windows 7. I was able to "restore" it from iTunes without any issues other than I hadn't back up in a month.  Now when I try to sync with iTunes it gets to step 5 of 5 and I get a "windows message that iTunes has encountered a problem and needs to shut down".  I can sync my iPad using the same cord, computer, and program with no issues.  I went through Apple support and uninstalled and reinstalled iTunes under their guidance.  I was then transferred to another level of tech support and got cut off.  I have not heard back and have tried to reopen the case without success so I am hoping someone has a way to resolve this issue so I can back up my phone. Thanks

    I had the same problem and this worked...
    http://topsearchforyou.com/2011/09/22/this-ipod-cannot-be-used-because-the-apple -mobile-device-service-is-not-started/

Maybe you are looking for

  • NOt geeting data in MC.5

    Hi Gurus, When i am executing MC.5 or MC.9 to analyse the storage location data, it is giving data doesn't exists.But when i see in MMBE or any stock releveant trasactions i am stock and also movement is there. Please help me in getting data in to MC

  • How do I update from ios 10.8 to yosemite

    how do I update from ios 10.8 to yosemite

  • How about a hard-shell case for the Zen Mic

    I recently bought my Zen Micro and the one accessory that I still need to pick up for it is a case. Now I know there is a pouch for it, but what I really want is a something more protecti've to put up with the rigors of travelling. I see they have th

  • Send payment advice by email. SAMPLE_PROCESS_00002040 / 50

    Dear all, we using the BT FM SAMPLE_PROCESS_00002040 for sending emails in PDF form to email addresses of the vendor. We are able to create the entry in SOST and send it by email. Now we have two additional requirements: 1. We want to use the email a

  • No Knowledge of ABAP, Can I learn SAP NETWEAVER XI ?

    Dear Friends, I do not have any experience or knowledge about ABAP. Can I learn XI or I MUST definitely learn ABAP first before I proceed to learn XI. Some people at various institutes told me to learn CA- Cross Applications and that would be enough.