Doubled tasks in Activiti process - apache-camel

I've got an Activiti code (Activiti 5.19 run with Camel on Servicemix) running in production and face some peculiar problem: sometimes I've got cases of doubled tasks in an execution (one of them is even tripled). It seems to have no clear pattern. What I've tested my code would throw an exception if any javascript call service to close the same task twice for some reason.
The doubled tasks neither can be completed (resulting "UserTask should not be signalled before complete" exception) nor deleted because the tasks are part of the running execution.
I cannot figure out what could cause such an effect and how to get rid of the redundant tasks in order to finish the damaged processes.
Is there possible to just delete the later records (with the highest task id) in the act_ru_task?
Anybody could help?
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.activiti.org/test">
<collaboration id="Collaboration">
<participant id="pool1" name="Pool" processRef="process_pool1"></participant>
</collaboration>
<process id="new_marketing" name="marketing" isExecutable="true" activiti:candidateStarterGroups="marketing,task_manager">
<laneSet id="laneSet_new_marketing">
<lane id="lane1" name="marketing">
<flowNodeRef>usertask1</flowNodeRef>
<flowNodeRef>startevent1</flowNodeRef>
<flowNodeRef>exclusivegateway1</flowNodeRef>
<flowNodeRef>usertask2</flowNodeRef>
<flowNodeRef>usertask3</flowNodeRef>
<flowNodeRef>usertask4</flowNodeRef>
<flowNodeRef>endevent1</flowNodeRef>
<flowNodeRef>exclusivegateway2</flowNodeRef>
<flowNodeRef>exclusivegateway3</flowNodeRef>
<flowNodeRef>usertask5</flowNodeRef>
<flowNodeRef>usertask6</flowNodeRef>
<flowNodeRef>endevent2</flowNodeRef>
</lane>
</laneSet>
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="Status_0" activiti:assignee="${employeeName}" activiti:candidateGroups="marketing" activiti:dueDate="${dueDate}">
<extensionElements>
<activiti:formProperty id="actionsForm" name="actions" type="enum" writable="false">
<activiti:value id="cancel" name="cancel"></activiti:value>
<activiti:value id="accepted" name="accepted"></activiti:value>
<activiti:value id="wait" name="wait"></activiti:value>
</activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="flow12" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow1" sourceRef="usertask1" targetRef="exclusivegateway1"></sequenceFlow>
<userTask id="usertask2" name="Status_10" activiti:assignee="${employeeName}">
<extensionElements>
<activiti:formProperty id="actionsForm" name="actions" type="enum" writable="false">
<activiti:value id="cancel" name="cancel"></activiti:value>
<activiti:value id="proceed" name="proceed"></activiti:value>
<activiti:value id="application" name="application"></activiti:value>
<activiti:value id="accepted" name="accepted"></activiti:value>
<activiti:value id="wait" name="wait"></activiti:value>
</activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="flow2" sourceRef="exclusivegateway1" targetRef="usertask2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'accepted'}]]></conditionExpression>
</sequenceFlow>
<userTask id="usertask3" name="Status_1" activiti:assignee="${employeeName}" activiti:dueDate="${dueDate}"></userTask>
<sequenceFlow id="flow3" name="Wait" sourceRef="exclusivegateway1" targetRef="usertask3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'wait'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" sourceRef="usertask3" targetRef="usertask1"></sequenceFlow>
<userTask id="usertask4" name="Status_1000" activiti:assignee="${employeeName}"></userTask>
<sequenceFlow id="flow5" name="GiveUp" sourceRef="exclusivegateway1" targetRef="usertask4">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'cancel'}]]></conditionExpression>
</sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow6" sourceRef="usertask4" targetRef="endevent1"></sequenceFlow>
<exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow7" sourceRef="usertask2" targetRef="exclusivegateway2"></sequenceFlow>
<endEvent id="endevent2" name="End"></endEvent>
<sequenceFlow id="flow10" sourceRef="exclusivegateway2" targetRef="usertask2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'wait'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow11" name="GiveUp" sourceRef="exclusivegateway2" targetRef="usertask4">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'cancel'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow8" sourceRef="exclusivegateway2" targetRef="usertask5">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'application'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow13" sourceRef="exclusivegateway2" targetRef="usertask6">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'proceed' || action == 'accepted'}]]></conditionExpression>
</sequenceFlow>
<userTask id="usertask5" name="Status_50" activiti:assignee="${employeeName}">
<extensionElements>
<activiti:formProperty id="actionsForm" name="actions" type="enum" writable="false">
<activiti:value id="cancel" name="cancel"></activiti:value>
<activiti:value id="accepted" name="accepted"></activiti:value>
</activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="flow14" sourceRef="usertask5" targetRef="exclusivegateway3"></sequenceFlow>
<exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow15" sourceRef="exclusivegateway3" targetRef="usertask6">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'accepted'}]]></conditionExpression>
</sequenceFlow>
<userTask id="usertask6" name="Status_90" activiti:assignee="${employeeName}"></userTask>
<sequenceFlow id="flow17" sourceRef="usertask6" targetRef="endevent2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'accepted'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow16" sourceRef="exclusivegateway3" targetRef="usertask4">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${action == 'cancel'}]]></conditionExpression>
</sequenceFlow>
</process>
</definitions>
The problem was checked in Activiti database using the following query:
select * from act_ru_task t0 where t0.execution_id_ in (select id_ from act_ru_execution t1 where (select count(*) from act_ru_task t2 where t1.id_ = t2.execution_id_) > 1);
Query presented 30 cases like this, below 3 of them (user logins anonimised):
id_ | rev_ | execution_id_ | proc_inst_id_ | proc_def_id_ | name_ | parent_task_id_ | description_ | task_def_key_ | owner_ | assignee_ |delegation_ | priority_ | create_time_ |
118399 | 1 | 118373 | 118373 | new_marketing:3:5004 | Status_50 | | | usertask5 | | auser | | 50 | 2017-08-08 08:46:28.771 |
118396 | 1 | 118373 | 118373 | new_marketing:3:5004 | Status_50 | | | usertask5 | | auser | | 50 | 2017-08-08 08:46:28.769 |
634792 | 1 | 453636 | 453636 | new_marketing:3:5004 | Status_1000 | | | usertask4 | | buser | | 50 | 2018-04-04 09:49:13.853 |
634791 | 1 | 453636 | 453636 | new_marketing:3:5004 | Status_1000 | | | usertask4 | | buser | | 50 | 2018-04-04 09:49:13.853 |
527864 | 1 | 527837 | 527837 | new_marketing:3:5004 | Status_90 | | | usertask6 | | cuser | | 50 | 2018-02-01 16:06:56.089 |
527867 | 1 | 527837 | 527837 | new_marketing:3:5004 | Status_90 | | | usertask6 | | cuser | | 50 | 2018-02-01 16:06:56.092 |

Related

Type is missing from type (TS2740) - cant override interface

I have a library called "#ww/react-ui-components"
This library contains Paper component, which extends the functionality of Paper from material ui.
This is how the .d.ts file of my Paper looks like (generated in the build):
import React, { RefObject } from 'react';
import { PaperProps } from '#material-ui/core/Paper';
import { WWAttributesProps } from 'hoc/withWindwardAttributes';
export declare type Props = PaperProps & {
rootElRef?: RefObject<any>;
withHoverEffect?: boolean;
};
declare const _default: React.ForwardRefExoticComponent<Pick<import("../hoc/withWindwardAttributes").Attributes & Pick<PaperProps & {
rootElRef?: React.RefObject<any> | undefined;
withHoverEffect?: boolean | undefined;
} & WWAttributesProps, "slot" | "style" | "title" | "ref" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "css" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "elevation" | "square" | "variant" | "innerRef" | "rootElRef" | "withHoverEffect">, "slot" | "style" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "css" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "elevation" | "square" | "variant" | "innerRef" | "rootElRef" | "withHoverEffect" | "wwComponentName"> & React.RefAttributes<unknown>>;
export default _default;
I have another library called "#ww/ofv-ui-components" which imports Paper from '#ww/react-ui-components"
When I use it, I get the following error:
Type '{ children: Element; }' is missing the following properties from type 'Pick<Attributes & Pick<any, "placeholder" | "onChange" | "children" | "classes" | "defaultValue" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 255 more ... | "withHoverEffect">, "placeholder" | ... 262 more ... | "withHoverEffect">': placeholder, onChange, classes, defaultValue, and 258 more.ts
I tried to override the Paper interface by creating modules.d.ts file in "#ww/ofv-ui-components" and used any just to see if it works - which it didnt.
Is there a way to override it somehow? I dont want to suppress the error or ignore it..
I want to fix it properly

Normalize data in object_construct in Snowflake

I'm using Snowflake's Object_Construct to create a JSON.
Use case: Snowflake table has Person Title as
Person Name
Title_1
Title_2
Title_3
in JSON structure, I need to transform this as
"Person_Title"[
{ "Title_1",
"Title_1_desc"
},
{"Title_2",
"Title_2_desc"
},
{"Title_3",
"Title_3_desc"
}
]
Below example outlines the placement of functions to get the output.
Though not sure if you are looking for any sort of dynamism, which following example does not gives -
with cte (Person_Name, Title_1, Title_2, Title_3) as (
select 'name-1','t1-desc-1','t2-desc-1','t3-desc-1' union all
select 'name-2','t1-desc-2','t2-desc-2','t3-desc-2' union all
select 'name-3','t1-desc-3','t2-desc-3','t3-desc-3'
)
select object_construct('Person_title',
array_construct(
object_construct('Title_1',Title_1),
object_construct('Title_2',Title_2),
object_construct('Title_3',Title_3))) output_json
from cte;
+------------------------------+
| OUTPUT_JSON |
|------------------------------|
| { |
| "Person_title": [ |
| { |
| "Title_1": "t1-desc-1" |
| }, |
| { |
| "Title_2": "t2-desc-1" |
| }, |
| { |
| "Title_3": "t3-desc-1" |
| } |
| ] |
| } |
| { |
| "Person_title": [ |
| { |
| "Title_1": "t1-desc-2" |
| }, |
| { |
| "Title_2": "t2-desc-2" |
| }, |
| { |
| "Title_3": "t3-desc-2" |
| } |
| ] |
| } |
| { |
| "Person_title": [ |
| { |
| "Title_1": "t1-desc-3" |
| }, |
| { |
| "Title_2": "t2-desc-3" |
| }, |
| { |
| "Title_3": "t3-desc-3" |
| } |
| ] |
| } |
+------------------------------+
Query with dynamism -
with cte (Person_Name, Title_1, Title_2, Title_3) as (
select 'name-1','t1-desc-1','t2-desc-1','t3-desc-1' union all
select 'name-2','t1-desc-2','t2-desc-2','t3-desc-2'
)
select object_construct('Person_title',
array_agg(object_construct(TITLE_DESC,TITLE))) as output_col
from
(select * from cte
unpivot (title for title_desc in (Title_1, Title_2, Title_3))
)
group by Person_Name;
+------------------------------+
| OUTPUT_COL |
|------------------------------|
| { |
| "Person_title": [ |
| { |
| "TITLE_1": "t1-desc-1" |
| }, |
| { |
| "TITLE_2": "t2-desc-1" |
| }, |
| { |
| "TITLE_3": "t3-desc-1" |
| } |
| ] |
| } |
| { |
| "Person_title": [ |
| { |
| "TITLE_1": "t1-desc-2" |
| }, |
| { |
| "TITLE_2": "t2-desc-2" |
| }, |
| { |
| "TITLE_3": "t3-desc-2" |
| } |
| ] |
| } |
+------------------------------+

Missing properties in React Typescript component

React component
import {Input} from '#xxx/forms';
<Input label="account Name" name="account"/>
input.d.ts
import React, { Ref } from 'react';
import { InputProps as UITKInputProps } from '#xxx/input';
import { WithStyles, Density } from '#xxx/theme';
import { FormFieldProps as FormFieldPropsType } from '../FormField';
import { NecessityStyle } from '../types';
import styles from './styles';
export declare type InputProps = WithStyles<typeof styles> & UITKInputProps & {
name: string;
label?: string;
id?: string;
disabled?: boolean;
FormFieldProps?: Omit<FormFieldPropsType, 'children' | 'name' | 'label'>;
required?: boolean;
necessityStyle?: NecessityStyle;
helperText?: string;
ref?: Ref<any>;
fullWidth?: boolean;
density?: Density;
};
declare const StyledInput: React.ComponentType<Pick<React.PropsWithChildren<InputProps>, "required" | "disabled" | "error" | "hidden" | "dir" | "label" | "slot" | "style" | "title" | "color" | "ref" | "children" | "onBlur" | "onChange" | "onSubmit" | "name" | "onFocus" | "defaultValue" | "id" | "textAlign" | "translate" | "margin" | "className" | "innerRef" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "fullWidth" | "autoFocus" | "value" | "inputProps" | "inputRef" | "readOnly" | "multiline" | "autoComplete" | "endAdornment" | "inputComponent" | "renderSuffix" | "rows" | "rowsMax" | "rowsMin" | "startAdornment" | "disableUnderline" | "density" | "necessityStyle" | "helperText" | "cursorPositionOnFocus" | "emptyReadOnlyMarker" | "highlightOnFocus" | "FormFieldProps"> & import("#material-ui/styles").StyledComponentProps<"disabled" | "input" | "root" | "readOnly" | "focused" | "multiline" | "inputMultiline" | "endAdornment" | "startAdornment" | "lowDensity" | "touchDensity" | "mediumDensity" | "highDensity" | "field">>;
export { StyledInput as Input };
The only required field for <Input /> is name. However, the compiler is complaining:
Type '{ name: string; }' is missing the following properties from type 'Pick<PropsWithChildren, "ref" | "label" | "slot" | "style" | "title" | "children" | "onBlur" | "onChange" | "onSubmit" | "autoComplete" | ... 276 mo
re ... | "FormFieldProps">': slot, style, title, onBlur, and 267 more.
How can I declare Input component inside my component?
While you didn't provide full type definitions for WithStyles and UITKInputProps I'd guess they are having a lot of required props inside. So your InputProps type gets expanded into a huge list of required props from those two types plus explicitly defined props with a required name field. Thus the error.
If you want your InputProps type to have the only required field name you may define it as:
export declare type InputProps
= Partial<WithStyles<typeof styles>>
& Partial<UITKInputProps>
& {
name: string;
label?: string;
id?: string;
disabled?: boolean;
FormFieldProps?: Omit<FormFieldPropsType, 'children' | 'name' | 'label'>;
required?: boolean;
necessityStyle?: NecessityStyle;
helperText?: string;
ref?: Ref<any>;
fullWidth?: boolean;
density?: Density;
};

TypeError: render is not a function while using React Context along with React Router

I need to set up a user state that can be called from different components. This setup uses React Router and React Context.
The React context contains just a single state that keeps track of the user's name.
At the top-level i.e App I have passed all the children on to the provider. But I get an error
TypeError: render is not a function
My UserContext code:
const UserContext = createContext();
export const UserProvider = (props) => {
const [user, setUser] = useState("");
return (
<UserContext.Provider value={[user, setUser]}>
{props.children}
</UserContext.Provider>
);
};
export default UserContext;
My App code :
function App() {
return (
<UserProvider>
<Router>
<div>
<Nav />
<Switch>
<Route exact path="/" component={Signup} />
<Route exact path="/signin" component={SignIn} />
<Route path="/register" component={UserRegister} />
<Route path="/homepage/:user" component={Homepage} />
</Switch>
</div>
</Router>
</UserProvider>
);
}
export default App;
The entrie error log:
TypeError: render is not a function
updateContextConsumer
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:18747
18744 | {
18745 | ReactCurrentOwner$1.current = workInProgress;
18746 | setIsRendering(true);
> 18747 | newChildren = render(newValue);
| ^ 18748 | setIsRendering(false);
18749 | } // React DevTools reads this flag.
18750 |
View compiled
beginWork
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:19114
19111 | return updateContextProvider(current, workInProgress, renderLanes);
19112 |
19113 | case ContextConsumer:
> 19114 | return updateContextConsumer(current, workInProgress, renderLanes);
| ^ 19115 |
19116 | case MemoComponent:
19117 | {
View compiled
HTMLUnknownElement.callCallback
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:3945
3942 | function callCallback() {
3943 | didCall = true;
3944 | restoreAfterDispatch();
> 3945 | func.apply(context, funcArgs);
| ^ 3946 | didError = false;
3947 | } // Create a global error event handler. We use this to capture the value
3948 | // that was thrown. It's possible that this error handler will fire more
View compiled
invokeGuardedCallbackDev
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:3994
3991 | // errors, it will trigger our global error handler.
3992 |
3993 | evt.initEvent(evtType, false, false);
> 3994 | fakeNode.dispatchEvent(evt);
| ^ 3995 |
3996 | if (windowEventDescriptor) {
3997 | Object.defineProperty(window, 'event', windowEventDescriptor);
View compiled
invokeGuardedCallback
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:4056
4053 | function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
4054 | hasError = false;
4055 | caughtError = null;
> 4056 | invokeGuardedCallbackImpl$1.apply(reporter, arguments);
4057 | }
4058 | /**
4059 | * Same as invokeGuardedCallback, but instead of returning an error, it stores
View compiled
beginWork$1
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:23964
23961 | } // Run beginWork again.
23962 |
23963 |
> 23964 | invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
| ^ 23965 |
23966 | if (hasCaughtError()) {
23967 | var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
View compiled
performUnitOfWork
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:22776
22773 |
22774 | if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
22775 | startProfilerTimer(unitOfWork);
> 22776 | next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
| ^ 22777 | stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
22778 | } else {
22779 | next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
View compiled
workLoopSync
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:22707
22704 | function workLoopSync() {
22705 | // Already timed out, so perform work without checking if we need to yield.
22706 | while (workInProgress !== null) {
> 22707 | performUnitOfWork(workInProgress);
22708 | }
22709 | }
22710 |
View compiled
renderRootSync
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:22670
22667 |
22668 | do {
22669 | try {
> 22670 | workLoopSync();
| ^ 22671 | break;
22672 | } catch (thrownValue) {
22673 | handleError(root, thrownValue);
View compiled
performSyncWorkOnRoot
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:22293
22290 | }
22291 | } else {
22292 | lanes = getNextLanes(root, NoLanes);
> 22293 | exitStatus = renderRootSync(root, lanes);
| ^ 22294 | }
22295 |
22296 | if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
View compiled
scheduleUpdateOnFiber
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:21881
21878 | // root inside of batchedUpdates should be synchronous, but layout updates
21879 | // should be deferred until the end of the batch.
21880 |
> 21881 | performSyncWorkOnRoot(root);
| ^ 21882 | } else {
21883 | ensureRootIsScheduled(root, eventTime);
21884 | schedulePendingInteractions(root, lane);
View compiled
updateContainer
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:25482
25479 | }
25480 |
25481 | enqueueUpdate(current$1, update);
> 25482 | scheduleUpdateOnFiber(current$1, lane, eventTime);
25483 | return lane;
25484 | }
25485 | function getPublicRootInstance(container) {
View compiled
(anonymous function)
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:26021
26018 |
26019 |
26020 | unbatchedUpdates(function () {
> 26021 | updateContainer(children, fiberRoot, parentComponent, callback);
| ^ 26022 | });
26023 | } else {
26024 | fiberRoot = root._internalRoot;
View compiled
unbatchedUpdates
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:22431
22428 | executionContext |= LegacyUnbatchedContext;
22429 |
22430 | try {
> 22431 | return fn(a);
| ^ 22432 | } finally {
22433 | executionContext = prevExecutionContext;
22434 |
View compiled
legacyRenderSubtreeIntoContainer
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:26020
26017 | } // Initial mount should not be batched.
26018 |
26019 |
> 26020 | unbatchedUpdates(function () {
| ^ 26021 | updateContainer(children, fiberRoot, parentComponent, callback);
26022 | });
26023 | } else {
View compiled
render
G:/WebDevelopmentFolder/trinkerrchallenge/node_modules/react-dom/cjs/react-dom.development.js:26103
26100 | }
26101 | }
26102 |
> 26103 | return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
26104 | }
26105 | function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
26106 | if (!isValidContainer(containerNode)) {
View compiled
Module.<anonymous>
G:/WebDevelopmentFolder/trinkerrchallenge/src/index.js:6
3 | import "./index.css";
4 | import App from "./App";
5 |
> 6 | ReactDOM.render(
7 | <React.StrictMode>
8 | <App />
9 | </React.StrictMode>,
View compiled
Module../src/index.js
http://localhost:3000/static/js/main.chunk.js:1581:30
__webpack_require__
G:/WebDevelopmentFolder/trinkerrchallenge/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
View compiled
fn
G:/WebDevelopmentFolder/trinkerrchallenge/webpack/bootstrap:150
147 | );
148 | hotCurrentParents = [];
149 | }
> 150 | return __webpack_require__(request);
| ^ 151 | };
152 | var ObjectFactory = function ObjectFactory(name) {
153 | return {
View compiled
1
http://localhost:3000/static/js/main.chunk.js:1595:18
__webpack_require__
G:/WebDevelopmentFolder/trinkerrchallenge/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
View compiled
checkDeferredModules
G:/WebDevelopmentFolder/trinkerrchallenge/webpack/bootstrap:45
42 | }
43 | if(fulfilled) {
44 | deferredModules.splice(i--, 1);
> 45 | result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
| ^ 46 | }
47 | }
48 |
View compiled
Array.webpackJsonpCallback [as push]
G:/WebDevelopmentFolder/trinkerrchallenge/webpack/bootstrap:32
29 | deferredModules.push.apply(deferredModules, executeModules || []);
30 |
31 | // run deferred modules when all chunks ready
> 32 | return checkDeferredModules();
| ^ 33 | };
34 | function checkDeferredModules() {
35 | var result;

camel-ftp intermittent issue

I am using camel-ftp component to upload a file into a server. I get the below exception randomly and ftp stops abruptly what could be the issue. appreciate any pointers.
The camel version I am using is 2.10.1
|Caused by: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: 8000211d-5f40-4bac-920a-a2e5f2575870.gpg
| at org.apache.camel.component.file.remote.SftpOperations.doStoreFile(SftpOperations.java:716)
| at org.apache.camel.component.file.remote.SftpOperations.storeFile(SftpOperations.java:649)
| at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:249)
| at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:151)
| at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)
| at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
| at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
| at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
| at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:81)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
| at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
| at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:120)
| at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:292)
| at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:115)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
| at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:81)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
| at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
| at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
| at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
| at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
| at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
| at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
| at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
| at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
| at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
| at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
| at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
| at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:360)
| at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:331)
| at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:227)
| at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:331)
| at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:186)
| at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115)
| at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:119)
| ... 59 more
|Caused by: 4: java.io.IOException: Pipe closed
| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:500)
| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:454)
| at org.apache.camel.component.file.remote.SftpOperations.doStoreFile(SftpOperations.java:701)
| ... 180 more
|Caused by: java.io.IOException: Pipe closed
| at java.io.PipedInputStream.read(PipedInputStream.java:291)
| at com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:344)
| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:466)
Since you mention that you have been able to do the operation successful at times, permission issue might not be there. Not sure if it could be a storage space issue, etc.
I suggest that the best way would be to try to debug via the source code for the version that you are using. You will find the exception being thrown in org.apache.camel.component.file.remote.FtpOperations Java class and the IOException is getting wrapped over there.
However, having said that - you could possibly look at having a Global Error Handler too. Here is an article that explains how: http://java.dzone.com/articles/camel-exception-handling . It could help in understanding what went wrong exactly.

Resources