I am getting error as Stream Closed, Here is the Details

I am getting error as Stream Closed, Here is the Details
I am using Filepolling port, and i have input ffdata(object) of the flowservice then i am trying to converting it into values using ConverToValues service, here i am getting error as Stream Closed.

com.wm.app.b2b.server.ServiceException: java.io.IOException: Stream closed
at pub.flatFileImpl.convertToValues(flatFileImpl.java:460)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:322)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:612)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:226)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:198)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:411)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:521)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:369)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:168)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:581)
at com.wm.lang.flow.FlowState.step(FlowState.java:438)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:403)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:982)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:612)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:226)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:198)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:411)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:521)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:369)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:128)
at com.wm.ff.net.FilePollingTransaction$RunService.write(FilePollingTransaction.java:433)
at com.wm.ff.net.FilePollingTransaction$RunService.run(FilePollingTransaction.java:284)
at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
at java.lang.Thread.run(Thread.java:534)

I followed another way like
taking ffdata then used StreamToBytes,BytesToString when i looked at the string it is inserting new line between each record.

Can anybody throw some ideas.

Thanks
Ram

Can you list out the steps you have in your service, in the way you want them to be working (e.g. without debugging steps or workarounds)?

  1. File Polling Port is configured like this.

Package Name TestPack1

Polling Information

Monitoring Directory \Test\Filelist
Working Directory (optional) unspecified
Completion Directory \Test\completionDir
Error Directory (optional)\Test\Err
File Name Filter (optional) *.TXT
File Age (optional) (seconds) unspecified
Content Type (optional) application/x-wmflatfile
Allow Recursive Polling No

Security

Run services as user Administrator
Message ProcessingProcessing TestPack1:FilePolingTestFlow
File Polling Interval 5
Log only when directory availability changes No
Directories are NFS mounted file system No
Cleanup Service (optional) unspecified
Cleanup At Startup Yes
Cleanup File Age (optional) (days) 7
Cleanup Interval (optional) (hours)24
Maximum number of Invocation Threads 1

2)input of the Flowservice declared as ffdata(i.e Object datatype)

3)Now I have SEQUENCE steps(For Try/Catch)
4)I have MAP step for App Info
5)Now I have ConvertToValues step , here i am mapping ffdata to ffData


in the convertToValues step it fails with message StreamClosed.

Actually i even tried Using the steps StreamToByes, BytesToString steps
Before CovertingToValues , here Whatever the String i get from BytesToString is having Extra newline between each record, if i map this String to ConvertToValues step It fails because of Record structure is not compliance with the schema.

Note:If I debug the flow by passing string as input istead of ffdata Object, ConvertToValues works fine without any errors.

I hope this gives you Clear Picture.

Thanks
Ram

Can anybody throw some ideas on this.

Thanks
Ram