Hi Amila,

Solved the problem. This was happening due to a permission issue. At the
first time I have created only the File Pointer without creating Folders
specifically when running through the Clarity. So that caused the problem.
When I tried the same folders with a separate server again that fails.
So now I create the folders  specifically for the testing. So Now the
scenario works fine.

Thanks
AndunSLG

On Wed, Aug 22, 2012 at 10:52 PM, Amila Maha Arachchi <[email protected]>wrote:

>
>
> On Wed, Aug 22, 2012 at 9:09 PM, Andun Sameera <[email protected]> wrote:
>
>> Hi Amila,
>>
>> As you suggested I have check with this config,
>>
>> <proxy name="VFSProxy7"
>>           transports="vfs"
>>           startOnLoad="true"
>>           trace="disable">
>>       <target>
>>          <inSequence>
>>             <property name="OUT_ONLY" value="true"/>
>>             <log level="full"/>
>>             <send>
>>                <endpoint name="FileEpr">
>>                   <address
>> uri="vfs:file:///home/andunslg/test/out/out.txt"/>
>>                </endpoint>
>>             </send>
>>          </inSequence>
>>       </target>
>>       <parameter name="transport.PollInterval">1</parameter>
>>       <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
>>       <parameter
>> name="transport.vfs.FileURI">/home/andunslg/test/in</parameter>
>>       <parameter
>> name="transport.vfs.MoveAfterProcess">file:///home/andunslg/test/original</parameter>
>>        <parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
>>       <parameter name="transport.vfs.ContentType">text/plain</parameter>
>>    </proxy>
>>
>> And It works fine. So what is the reason for this behavior ? When run via
>> clarity can make permission issues, but even I run the
>> server separately it happened. That was the weird thing.
>>
>
> Still can be a permission issue. But int the code segment I pasted in the
> previous reply, there are some places I dont understand. So cannot predict
> the exact reason.
>
> BTW, did you check permission for the relevant directories in the failed
> case without Clarity (I think you used the same folder paths for clarity
> and without clarity). You also can debug and see.
>
> Regards,
> AmilaM.
>
>>
>> Thanks
>> AndunSLG
>>
>> On Wed, Aug 22, 2012 at 7:41 PM, Amila Maha Arachchi <[email protected]>wrote:
>>
>>> Hi Andun,
>>>
>>> I tried this with ESB 4.0.3 and it works fine (I dont have a 4.5.0 to
>>> test). Nothing has been changed after 4.0.3 in the relevant code.
>>>
>>> Following code segment is the responsible for this. You can debug
>>> commons-vfs's AbstractFileObject class and see where exactly it goes wrong.
>>>
>>> BTW, when you tried without Clarity, did you try using a separate file
>>> location (not in integration/tests/target, but some other place like your
>>> home folder to see whether this is permission problem)?
>>>
>>> if (canRenameTo(destFile))
>>>         {
>>>            * // issue rename on same filesystem*
>>>             try
>>>             {
>>>                 attach();
>>>                 doRename(destFile);
>>>
>>>
>>> (FileObjectUtils.getAbstractFileObject(destFile)).handleCreate(getType());
>>>
>>>                 destFile.close(); // now the destFile is no longer
>>> imaginary. force reattach.
>>>
>>>                 handleDelete(); // fire delete-events. This file-object
>>> (src) is like deleted.
>>>             }
>>>             catch (final RuntimeException re)
>>>             {
>>>                 throw re;
>>>             }
>>>             catch (final Exception exc)
>>>             {
>>>                 *throw new
>>> FileSystemException("vfs.provider/rename.error", new Object[]
>>>                     {
>>>                         getName(),
>>>                         destFile.getName()
>>>                     }, exc);*
>>>             }
>>>         }
>>>
>>> Regards,
>>> AmilaM.
>>>
>>>  On Wed, Aug 22, 2012 at 6:11 PM, Andun Sameera <[email protected]> wrote:
>>>
>>>>  Hi All,
>>>>
>>>> I am trying to test the functionality of transport.vfs.MoveAfterProcess
>>>> using the following configuration,
>>>>
>>>>  <proxy name="VFSProxy7"
>>>>           transports="vfs"
>>>>           startOnLoad="true"
>>>>           trace="disable">
>>>>       <target>
>>>>          <inSequence>
>>>>             <property name="OUT_ONLY" value="true"/>
>>>>             <log level="full"/>
>>>>             <send>
>>>>                <endpoint name="FileEpr">
>>>>                   <address
>>>> uri="vfs:file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/out/out.txt"/>
>>>>                </endpoint>
>>>>             </send>
>>>>          </inSequence>
>>>>       </target>
>>>>       <parameter
>>>> name="transport.vfs.ActionAfterProcess">MOVE</parameter>
>>>>       <parameter name="transport.PollInterval">1</parameter>
>>>>       <parameter
>>>> name="transport.vfs.MoveAfterProcess">file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/original/</parameter>
>>>>       <parameter
>>>> name="transport.vfs.FileURI">/media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/in/</parameter>
>>>>       <parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
>>>>       <parameter name="transport.vfs.ContentType">text/plain</parameter>
>>>>    </proxy>
>>>>
>>>> When I put a file to the in folder following exception is thrown in
>>>> console continues. Also I am uploading the config via the Clarity
>>>> Framework. Also I tried without Clarity just running a ESB instance. That
>>>> also fails in the same manner.
>>>>
>>>> TID: [] [WSO2 Enterprise Service Bus] [2012-08-22 18:00:49,992] ERROR
>>>> {org.apache.synapse.transport.vfs.VFSTransportListener} - Error moving file
>>>> :
>>>> file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/in/test.txt
>>>> to
>>>> file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/original/
>>>> {org.apache.synapse.transport.vfs.VFSTransportListener}
>>>> org.apache.commons.vfs2.FileSystemException: Could not rename
>>>> "file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/in/test.txt"
>>>> to
>>>> "file:///media/Studies/My_Works/WSO2_Carbon_Trunk/platform_4.0.0/4.0.0/products/esb/4.5.0/modules/integration/tests/target/test-classes/artifacts/ESB/synapseconfig/vfsTransport/test/original/test.txt".
>>>> at
>>>> org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1117)
>>>> at
>>>> org.apache.synapse.transport.vfs.VFSTransportListener.moveOrDeleteAfterProcessing(VFSTransportListener.java:425)
>>>> at
>>>> org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:322)
>>>> at
>>>> org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:158)
>>>> at
>>>> org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:107)
>>>> at
>>>> org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
>>>> at
>>>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>>>> at java.lang.Thread.run(Thread.java:619)
>>>>
>>>> When I change the transport.vfs.MoveAfterProcess to DELETE it works
>>>> fine.
>>>>
>>>> Thanks
>>>> AndunSLG
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Amila Maharachchi*
>>> Technical Lead
>>> Member, Management Committee - Cloud & Platform TG
>>> WSO2, Inc.; http://wso2.com
>>>
>>> Blog: http://maharachchi.blogspot.com
>>> Mobile: +94719371446
>>>
>>>
>>>
>>
>
>
> --
> *Amila Maharachchi*
> Technical Lead
> Member, Management Committee - Cloud & Platform TG
> WSO2, Inc.; http://wso2.com
>
> Blog: http://maharachchi.blogspot.com
> Mobile: +94719371446
>
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to