The required property 'blobName' is missing from the request - blob

I am trying to create one stream analytics job in azure with one input of type stream and another of type Reference programatically (both by C# Code and Powershell). I am able to create the job with stream input, however when i go and create Reference type input (Azure Blob) I get the error
New-AzureRmStreamAnalyticsJob : HTTP Status Code: 422
Error Code: 422
Error Message: The required property 'blobName' is missing from the request.
Request Id: b1bd2f67-8b69-4948-8800-184e171f6040
Timestamp (Utc):03/07/2018 08:52:11
At line:21 char:1
+ New-AzureRmStreamAnalyticsJob -File "C:\Users\rakesh.khanna\Desktop\A ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmStreamAnalyticsJob], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.StreamAnalytics.NewAzureStreamAnalyticsJobCommand.
Thanks.

Related

SQL Error [42581]: UCAExc:::5.0.1 unexpected token : INTO required: FROM : line: 2

when I'm trying creating new table in access db via dbeaver using the following code
SELECT *
INTO new_tab
FROM tab
WHERE col_name = smth
I obtain error
"SQL Error [42581]: UCAExc:::5.0.1 unexpected token : INTO required: FROM : line: "
What can be the reason of this problem?
I've updated hsqldb.jar to version hsqldb-2.7.1
Please direct me to way where to dig the neccessary information to resolve this bug

Mediation of Class Mediator not happening

I am hitting my api from another service with help of endpoint in Wso2. However, I am getting the error below:
"errorCode": "0",
"errorMessage": "Error occured in the mediation of the class mediator"
Note: The error comes only for one endpoint rest all is working absolutely fine for the same service. Unable to figure out the problem.
for further detail of error I am attaching it below:
"errorDetail": "org.apache.synapse.SynapseException: Error occured in the mediation of the class mediator\n\tat
org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:102)\n\tat
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:109)\n\tat
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)\n\tat
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)\n\tat
org.apache.synapse.api.Resource.process(Resource.java:342)\n\tat
org.apache.synapse.api.API.process(API.java:463)\n\tat
org.apache.synapse.api.AbstractApiHandler.apiProcess(AbstractApiHandler.java:93)\n\tat
org.apache.synapse.api.AbstractApiHandler.dispatchToAPI(AbstractApiHandler.java:71)\n\tat
org.apache.synapse.api.rest.RestRequestHandler.dispatchToAPI(RestRequestHandler.java:84)\n\tat
org.apache.synapse.api.rest.RestRequestHandler.process(RestRequestHandler.java:70)\n\tat
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:54)\n\tat
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:344)\n\tat
org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:101)\n\tat
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)\n\tat
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:375)\n\tat
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:434)\n\tat
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:182)\n\tat
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat
java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: org.apache.synapse.SynapseException:
org.json.simple.parser.ParseException\n\tat
org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:376)\n\tat
com.safaricom.mediator.RESTInteractRequestMediator.mediate(RESTInteractRequestMediator.java:139)\n\tat
org.apache.synapse.mediators.ext.ClassMediator.updateInstancePropertiesAndMediate(ClassMediator.java:178)\n\tat
org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:97)\n\t... 20
more\nCaused by: Unexpected character (<) at position 0.\n\tat
org.json.simple.parser.Yylex.yylex(Yylex.java:610)\n\tat
org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)\n\tat
org.json.simple.parser.JSONParser.parse(JSONParser.java:118)\n\tat
org.json.simple.parser.JSONParser.parse(JSONParser.java:81)\n\tat
org.json.simple.parser.JSONParser.parse(JSONParser.java:75)\n\tat
com.safaricom.mediator.RESTInteractRequestMediator.mediate(RESTInteractRequestMediator.java:44)\n\
t... 22 more\n"
It seems your client is sending an XML request body to an API that expects a JSON message, or sending the wrong Content-Type header.

camel aws2-s3 component - producer prefix option on upload

I am trying to use camel (3.7.5) aws2-s3 component to upload a file to AWS S3 storage. Consuming works just fine with bucket being configured using specific prefix as component's consumer option - access credentials are therefore correct (accessKey and secretKey). However, producer does not work leaving me with AccessDenied 403. I suspect that it is due to invalid prefix/path configured on producer: on consumer if I set invalid prefix I get identical error (403). On the producer I tried to use the same 'prefix' option but apparently that does not work/the docs also mention "prefix" as only consumer option. How do I set prefix for producer properly?
That works:
from("aws2-s3://MY_BUCKET?" +
"region=eu-central-1" +
"&accessKey=RAW(XXX)" +
"&secretKey=RAW(YYY)" +
"&prefix=MY_PREFIX").log("tick");
That does not work (403):
from("timer://foo?fixedRate=true&period=5000").routeId("aws-route")
.setHeader(AWS2S3Constants.KEY, simple("TEST.xml"))
.setBody(simple("Hello"))
.to("aws2-s3://MY_BUCKET?"
+ "region=eu-central-1"
+ "&prefix=MY_PREFIX"
+ "&accessKey=RAW(XXX)"
+ "&secretKey=RAW(YYY)");
Caused by: software.amazon.awssdk.services.s3.model.S3Exception: Access Denied (Service: S3, Status Code: 403, Request ID: JMCHHA87HN67C2B6, Extended Request ID: 6dEH4iuPXS4dgbJUCtHqw2gfmGuwgbw1cJcvevWpBCnZWJxjCg9oyd1MGWJh++pe2HIe1rT2dws=)
at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156)
at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:106)
at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:84)
at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:42)
at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:94)
at software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$successTransformationResponseHandler$6(BaseClientHandler.java:252)
at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:40)
at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:30)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:73)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42)
at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:77)
at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:39)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:50)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:36)
at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:64)
at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:34)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56)
at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26)
at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:193)
at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:133)
at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:159)
at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:112)
at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:167)
at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:94)
at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45)
at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:55)
at software.amazon.awssdk.services.s3.DefaultS3Client.listObjects(DefaultS3Client.java:5901)
at org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:114)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84)
at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:230)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:101)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1487)
at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:60)
... 27 more
When you set the header
.setHeader(AWS2S3Constants.KEY, simple("TEST.xml"))
It should be enough to prepend the prefix
.setHeader(AWS2S3Constants.KEY, simple("<prefix>/TEST.xml"))

How to get more information about dataweave exception in muleosft

I am getting below dataweave exception while executing a mule flow :
"
INFO 2016-11-06 09:02:42,097 [[abc].HTTP_Listener_Configuration.worker.01] com.mulesoft.weave.mule.utils.MuleWeaveFactory$: MimeType was not resolved '*/*' delegating to Java.
ERROR 2016-11-06 09:02:42,290 [[abc].HTTP_Listener_Configuration.worker.01] org.mule.exception.CatchMessagingExceptionStrategy:
Message : Exception while executing:
"Response": {
^
Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
Payload : test
Payload Type : java.lang.String
Element : /Process11/processors/9/1/9 # abc:def.xml:331 (TM_F1)
Element XML : <dw:transform-message doc:name="TM_F1">
<dw:set-payload>%dw 1.0%output application/json---{Data: [{// in_id : flowVars.instanceId,pd: '{AmIds:[{AmId:' ++ flowVars.AmId ++ '}]}'}]}</dw:set-payload>
</dw:transform-message>
Root Exception stack trace:
com.mulesoft.weave.reader.json.JsonReaderException: Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
at com.mulesoft.weave.reader.json.JsonTokenizer.fail(JsonTokenizer.scala:193)
at com.mulesoft.weave.reader.json.JsonTokenizer.require(JsonTokenizer.scala:190)
at com.mulesoft.weave.reader.json.JsonTokenizer.readString(JsonTokenizer.scala:80)
"
Is there any possibility to enable more debug options to get more information about this particular exception so that it will be easy to find out the root cause.
The problem here is, even though i am not using the payload in transform message i am getting error because of the payload returned by the previous http call in muleflow.
Mule version is : studio 6.1 and runtime 3.8.
Please help me to solve this issue.
Thanks
sdg
This is not dataweave question. Exception what you have is from JsonReaderException:
com.mulesoft.weave.reader.json.JsonReaderException: Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
It means that JSON what you provide has new line (\u000a) ate line 2 position 24. I imagine it is something like this:
"Response": {
"Message" : "67890123
456 the end"
}
Use special characters to represent new line in JSON.
"Response": {
"Message" : "67890123\n456 the end"
}
Enable info logs in log4j and enable debug logs at cloudhub if its an on cloud deployment.
Please Try validating the json as well
Debug is the best option to figure out these kind of errors. Also you may use the logger feature of dataweave to log specific values on console and see whats wrong with the value.

WCF: The server method 'MyMethod' failed

The WCF service is deployed on different machine.
Im able to get the http://MyServer/MYService.svc/jsdebug file by giving
<identity>
<dns value="ServerName and the portnumber"/>
And I'm able to invoke the service method using javascript.
After invoking the MyMethod.
I get this error in the javascript --> The server method 'MyMethod' failed, status 404 (in failedCallback)
MyMethod returns a Boolean value in svc.cs file after performing a datacheck.
These are the errors came up when I used Firefox Firebug:
When I call the same service using VS2008 in my development environment it works fine.
I found that following are the files which are not loading while using Ajax enabled VS2005
1) MicrosoftAjax.debug.js(3.5)
2) MicrosoftAjaxWebForms.debug.js(3.5) During runtime
Its obvious that 3.5 debug files doesn't load but, 1.0.6 debug files should load without the errors displayed below.
invokeCalledTwice":"Cannot call invoke more than once.",
11"webServiceFailed":"The server method \u0027{0}\u0027 failed with the following error: {1}",
12"argumentType":"Object cannot be converted to the required type.",
13"argumentNull":"Value cannot be null.",
14"controlCantSetId":"The id property can\u0027t be set on a control.",
15"formatBadFormatSpecifier":"Format specifier was invalid.",
16"webServiceFailedNoMsg":"The server method \u0027{0}\u0027 failed.",
17"argumentDomElement":"Value must be a DOM element.",
18"invalidExecutorType":"Could not create a valid Sys.Net.WebRequestExecutor from: {0}.",
19"cannotCallBeforeResponse":"Cannot call {0} when responseAvailable is false.",
20"actualValue":"Actual value was {0}.",
21"enumInvalidValue":"\u0027{0}\u0027 is not a valid value for enum {1}.",
22"scriptLoadFailed":"The script \u0027{0}\u0027 could not be loaded.",
23"parameterCount":"Parameter count mismatch.",
24"cannotDeserializeEmptyString":"Cannot deserialize empty string.",
25"formatInvalidString":"Input string was not in a correct format.",
26"invalidTimeout":"Value must be greater than or equal to zero.",
27"cannotAbortBeforeStart":"Cannot abort when executor has not started.",
28"argument":"Value does not fall within the expected range.",
29"cannotDeserializeInvalidJson":"Cannot deserialize. The data does not correspond to valid JSON.",
30"invalidHttpVerb":"httpVerb cannot be set to an empty or null string.",
31"nullWebRequest":"Cannot call executeRequest with a null webRequest.",
32"eventHandlerInvalid":"Handler was not added through the Sys.UI.DomEvent.addHandler method.",
33"cannotSerializeNonFiniteNumbers":"Cannot serialize non finite numbers.",
34"argumentUndefined":"Value cannot be undefined.",
35"webServiceInvalidReturnType":"The server method \u0027{0}\u0027 returned an invalid type. Expected type: {1}",
36"servicePathNotSet":"The path to the web service has not been set.",
37"argumentTypeWithTypes":"Object of type \u0027{0}\u0027 cannot be converted to type \u0027{1}\u0027.",
38"cannotCallOnceStarted":"Cannot call {0} once started.",
39"badBaseUrl1":"Base URL does not contain ://.",
40"badBaseUrl2":"Base URL does not contain another /.",
41"badBaseUrl3":"Cannot find last / in base URL.",
42"setExecutorAfterActive":"Cannot set executor after it has become active.",
43"paramName":"Parameter name: {0}",
44"cannotCallOutsideHandler":"Cannot call {0} outside of a completed event handler.",
45"format":"One of the identified items was in an invalid format.",
46"assertFailedCaller":"Assertion Failed: {0}\r\nat {1}",
47"argumentOutOfRange":"Specified argument was out of the range of valid values.",
48"webServiceTimedOut":"The server method \u0027{0}\u0027 timed out.",
49"notImplemented":"The method or operation is not implemented.",
50"assertFailed":"Assertion Failed: {0}",
51"invalidOperation":"Operation is not valid due to the current state of the object.",
52"breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"
Appreciate your inputs.
Seeing as you have Firebug installed, you can use it to check the HTTP request and response to see if they contain more information about what went wrong.
These are the errors came up when I used Firefox Firebug:
When I call the same service using VS2008 in my development environment it works fine.
I found that following are the files which are not loading while using Ajax enabled VS2005
1) MicrosoftAjax.debug.js(3.5)
2) MicrosoftAjaxWebForms.debug.js(3.5) During runtime
Its obvious that 3.5 debug files doesn't load but, 1.0.6 debug files should load without the errors displayed below.
invokeCalledTwice":"Cannot call invoke more than once.",
11"webServiceFailed":"The server method \u0027{0}\u0027 failed with the following error: {1}",
12"argumentType":"Object cannot be converted to the required type.",
13"argumentNull":"Value cannot be null.",
14"controlCantSetId":"The id property can\u0027t be set on a control.",
15"formatBadFormatSpecifier":"Format specifier was invalid.",
16"webServiceFailedNoMsg":"The server method \u0027{0}\u0027 failed.",
17"argumentDomElement":"Value must be a DOM element.",
18"invalidExecutorType":"Could not create a valid Sys.Net.WebRequestExecutor from: {0}.",
19"cannotCallBeforeResponse":"Cannot call {0} when responseAvailable is false.",
20"actualValue":"Actual value was {0}.",
21"enumInvalidValue":"\u0027{0}\u0027 is not a valid value for enum {1}.",
22"scriptLoadFailed":"The script \u0027{0}\u0027 could not be loaded.",
23"parameterCount":"Parameter count mismatch.",
24"cannotDeserializeEmptyString":"Cannot deserialize empty string.",
25"formatInvalidString":"Input string was not in a correct format.",
26"invalidTimeout":"Value must be greater than or equal to zero.",
27"cannotAbortBeforeStart":"Cannot abort when executor has not started.",
28"argument":"Value does not fall within the expected range.",
29"cannotDeserializeInvalidJson":"Cannot deserialize. The data does not correspond to valid JSON.",
30"invalidHttpVerb":"httpVerb cannot be set to an empty or null string.",
31"nullWebRequest":"Cannot call executeRequest with a null webRequest.",
32"eventHandlerInvalid":"Handler was not added through the Sys.UI.DomEvent.addHandler method.",
33"cannotSerializeNonFiniteNumbers":"Cannot serialize non finite numbers.",
34"argumentUndefined":"Value cannot be undefined.",
35"webServiceInvalidReturnType":"The server method \u0027{0}\u0027 returned an invalid type. Expected type: {1}",
36"servicePathNotSet":"The path to the web service has not been set.",
37"argumentTypeWithTypes":"Object of type \u0027{0}\u0027 cannot be converted to type \u0027{1}\u0027.",
38"cannotCallOnceStarted":"Cannot call {0} once started.",
39"badBaseUrl1":"Base URL does not contain ://.",
40"badBaseUrl2":"Base URL does not contain another /.",
41"badBaseUrl3":"Cannot find last / in base URL.",
42"setExecutorAfterActive":"Cannot set executor after it has become active.",
43"paramName":"Parameter name: {0}",
44"cannotCallOutsideHandler":"Cannot call {0} outside of a completed event handler.",
45"format":"One of the identified items was in an invalid format.",
46"assertFailedCaller":"Assertion Failed: {0}\r\nat {1}",
47"argumentOutOfRange":"Specified argument was out of the range of valid values.",
48"webServiceTimedOut":"The server method \u0027{0}\u0027 timed out.",
49"notImplemented":"The method or operation is not implemented.",
50"assertFailed":"Assertion Failed: {0}",
51"invalidOperation":"Operation is not valid due to the current state of the object.",
52"breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"