Hi Jussi,

does the file already exist when you try to deploy the SU ?
have you permission to read the file ?

Regards
JB

Jussi Nummelin wrote:
Hi all,

We're trying to develop something on top of VFS component. The use
case is following:

An external service uploads a zip file into pre-defined directory.
That zip file contains multiple files from which only one is of
interest for us. So this file should be passed to the bus by VFS
component.

We tried this with following SU xbean:
<vfs:poller service="test:file_poller"
               endpoint="endpoint"
               targetService="test:file_sender"
               path="zip:file:///tmp/import/somefile.zip!/log/log.xml">

  </vfs:poller>

According to the VFS pages the file URL should be fine.
http://commons.apache.org/vfs/filesystems.html


With this we get following exception:

INFO  - ServiceUnitLifeCycle           - Starting service unit: vfs-poller
INFO  - DeploymentService              - Error in start
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message";
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message";>
        <component-name>servicemix-vfs</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>start</task-id>
                        <task-result>FAILED</task-result>
                        <message-type>ERROR</message-type>
                        <task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
                                        <loc-message>Failed to
initialize file system manager:
org.apache.commons.vfs.FileSystemException: Could not r
eplicate "file:///tmp/import/somefile.zip" as it does not exist.</loc-message>

<stack-trace><![CDATA[java.io.IOException: Failed to initialize file
system manager: org.apache.commons.vfs.Fi
leSystemException: Could not replicate
"file:///tmp/import/somefile.zip" as it does not exist.
        at 
org.apache.servicemix.vfs.FileObjectResolver.resolveToFileObject(FileObjectResolver.java:66)
        at 
org.apache.servicemix.vfs.VFSPollingEndpoint.start(VFSPollingEndpoint.java:119)
        at 
org.apache.servicemix.common.DefaultServiceUnit.start(DefaultServiceUnit.java:78)
        at 
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:155)
        at 
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
        at 
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:154)
        at 
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
        at 
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
        at 
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
        at 
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
        at 
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
        at 
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>



Any help truly appreciated. :)


Cheers,
- Jussi -

--
Jean-Baptiste Onofré
---------------------------------
 HomePage
http://www.nanthrax.net
---------------------------------
 Contacts
[email protected]
[email protected]
---------------------------------
 OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Reply via email to