2016-09-29 2 views
0

Я установил конечную точку sftp в пакетном потоке Mule, чтобы вытащить файл test.csv с сервера CrushFTP, который я установил локально на своем ноутбуке.Объект org.mule.transport.sftp.SftpInputStream не корректной ошибки типа

Когда я развернуть Mule проекта он развертывает успешно, но затем я вижу это сообщение об ошибке, как он неоднократно пытается вытянуть файл CSV:

******************************************************************************************************* 
*   - - + APPLICATION + - -   *  - - + DOMAIN + - -  * - - + STATUS + - - * 
******************************************************************************************************* 
* sftpproj          * default      * DEPLOYED   * 
******************************************************************************************************* 

INFO 2016-09-29 10:43:34,241 [[sftpproj].SFTP.receiver.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Created instance 30388390-8629-11e6-a2c5-1e6f20524153 for batch job sftpprojBatch 
INFO 2016-09-29 10:43:34,243 [[sftpproj].SFTP.receiver.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Starting input phase 
INFO 2016-09-29 10:43:34,245 [[sftpproj].SFTP.receiver.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Input phase completed 
ERROR 2016-09-29 10:43:34,281 [[sftpproj].SFTP.receiver.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
******************************************************************************** 
Message    : Object "org.mule.transport.sftp.SftpInputStream" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" (java.lang.IllegalArgumentException) 
Type     : com.mulesoft.module.batch.exception.BatchException 
Code     : MULE_ERROR--2 
******************************************************************************** 
Exception stack is: 
1. Object "org.mule.transport.sftp.SftpInputStream" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" (java.lang.IllegalArgumentException) 
    org.mule.util.collection.EventToMessageSequenceSplittingStrategy:64 (null) 
2. Object "org.mule.transport.sftp.SftpInputStream" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" (java.lang.IllegalArgumentException) (com.mulesoft.module.batch.exception.BatchException) 
    com.mulesoft.module.batch.engine.DefaultBatchEngine:378 (null) 
******************************************************************************** 
Root Exception stack trace: 
java.lang.IllegalArgumentException: Object "org.mule.transport.sftp.SftpInputStream" not of correct type. It must be of type "{interface java.lang.Iterable,interface java.util.Iterator,interface org.mule.routing.MessageSequence,interface java.util.Collection}" 
    at org.mule.util.collection.EventToMessageSequenceSplittingStrategy.split(EventToMessageSequenceSplittingStrategy.java:64) 
    at org.mule.util.collection.EventToMessageSequenceSplittingStrategy.split(EventToMessageSequenceSplittingStrategy.java:25) 
    at com.mulesoft.module.batch.engine.queue.BatchQueueLoader.splitAndLoad(BatchQueueLoader.java:63) 
    at com.mulesoft.module.batch.engine.DefaultBatchEngine.load(DefaultBatchEngine.java:361) 
    at com.mulesoft.module.batch.DefaultBatchJob.execute(DefaultBatchJob.java:305) 
    at com.mulesoft.module.batch.DefaultBatchJob$1.process(DefaultBatchJob.java:229) 
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
    at org.mule.transport.AbstractMessageReceiver.routeEvent(AbstractMessageReceiver.java:511) 
    at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:226) 
    at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:208) 
    at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:200) 
    at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:187) 
    at org.mule.transport.sftp.SftpMessageReceiver$1.process(SftpMessageReceiver.java:203) 
    at org.mule.transport.sftp.SftpMessageReceiver$1.process(SftpMessageReceiver.java:179) 
    at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16) 
    at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:35) 
    at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:22) 
    at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30) 
    at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:14) 
    at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:67) 
    at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:44) 
    at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50) 
    at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:40) 
    at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:41) 
    at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:48) 
    at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28) 
    at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:13) 
    at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:110) 
    at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:30) 
    at org.mule.transport.sftp.SftpMessageReceiver.routeFile(SftpMessageReceiver.java:178) 
    at org.mule.transport.sftp.SftpMessageReceiver.poll(SftpMessageReceiver.java:121) 
    at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:216) 
    at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:80) 
    at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:49) 
    at org.mule.transport.TrackingWorkManager$TrackeableWork.run(TrackingWorkManager.java:267) 
    at org.mule.work.WorkerContext.run(WorkerContext.java:286) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 

******************************************************************************** 

Это выглядит так, как будто тип данные неверны, но не уверен, как я может изменить это, поскольку я не могу установить соединитель преобразования между конечной точкой sftp и сервером sftp. Я установил тип MIME для приложения/csv на вкладке «Дополнительно» конечной точки sftp, но сообщение об ошибке все еще сохраняется.

Кто-нибудь знает, как я могу решить эту проблему?

код XML:

<?xml version="1.0" encoding="UTF-8"?> 

<mule xmlns:ftp="http://www.mulesoft.org/schema/mule/ee/ftp" xmlns:sftp="http://www.mulesoft.org/schema/mule/sftp" xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/sftp http://www.mulesoft.org/schema/mule/sftp/current/mule-sftp.xsd 
http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd 
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd"> 
    <sftp:connector name="SFTP" validateConnections="true" doc:name="SFTP"/> 
    <batch:job name="orderexperienceBatch"> 
     <batch:input> 
      <sftp:inbound-endpoint connector-ref="SFTP" host="localhost" port="2222" path="//" user="${ftp.user}" password="${ftp.password}" responseTimeout="10000" mimeType="application/csv" doc:name="SFTP"/> 
     </batch:input> 
     <batch:process-records> 
      <batch:step name="Batch_Step"> 
       <logger level="INFO" doc:name="Logger"/> 
      </batch:step> 
     </batch:process-records> 
     <batch:on-complete> 
      <logger level="INFO" doc:name="Logger"/> 
     </batch:on-complete> 
    </batch:job> 
</mule> 

CSV файл:

1,test 

ответ

0

Это не проблема с CSV или конфигурации. Фактически batch:input должен генерировать итерируемые данные. Поместите следующий DWL, и он будет работать нормально.

%dw 1.0 
%output application/java 
--- 
payload 

Надеется, что это помогает

+0

Спасибо. Похоже, что он разрешил эту ошибку, но теперь получил эту ошибку: ERROR 2016-09-29 12: 13: 46,804 [[orderexperience] .SFTP.receiver.01] org.mule.transport.sftp.SftpMessageReceiver: ошибка в опросе java.io.IOException: 3:% DELE-bad% – user3165854

Смежные вопросы