Hi,

I'm a kinda new on using ServiceMix. I've checked the samples included in
the version 3.0-M1.

I am using vfs to Poll binary files from an ftp server and write them on a
local directory.
I am using the BinaryFilesMarsheler which is an extend of the
DefaultFilesMarsheler.

The FilePoller seems to work fine, but the FileWriter write files with 0
bytes Length on my local directory.
I guess that the content may be dropped.

Here is the error message i get on the console :

ERROR - FilePoller.processFileAndDelete(164) | Failed to process file:
ftp://ser
vicemix:[EMAIL PROTECTED]/Facsmile.txt. Reason: java.lang.NullPointerException
java.lang.NullPointerException
        at
org.apache.servicemix.components.util.BinaryFileMarshaler.writeMessag
e(BinaryFileMarshaler.java:73)
        at
org.apache.servicemix.components.vfs.FileWriter.process(FileWriter.ja
va:124)
        at
org.apache.servicemix.components.util.OutBinding.onMessageExchange(Ou
tBinding.java:48)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:636)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:171)
        at
org.apache.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:47)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.jav
a:121)
        at
org.apache.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:2
95)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
ainer.java:683)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:450)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
veryChannelImpl.java:524)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
veryChannelImpl.java:501)
        at
org.apache.servicemix.components.vfs.FilePoller.processFile(FilePolle
r.java:185)
        at
org.apache.servicemix.components.vfs.FilePoller.processFileAndDelete(
FilePoller.java:156)
        at
org.apache.servicemix.components.vfs.FilePoller$1.run(FilePoller.java
:72)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
urce)
        at java.lang.Thread.run(Thread.java:595)

------------------------------------------------------- EOERROR

Here is the configuration am using :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0";
       xmlns:spring="http://xbean.org/schemas/spring/1.0";
       xmlns:foo="http://servicemix.org/demo/";>
              
<sm:container id="jbi" useMBeanServer="true" flowName="st"
                createMBeanServer="true" dumpStats="true"  statsInterval="10">
     <sm:activationSpecs>
        <sm:activationSpec componentName="fileWriter" service="foo:fileWriter">
        <sm:component>
        <spring:bean class="org.apache.servicemix.components.vfs.FileWriter">
        <property name="path" value="file://D:/dev/servers"/>
        <property name="marshaler" ref="marshaler"/>
        </spring:bean>
        </sm:component>
                </sm:activationSpec>
                <sm:activationSpec componentName="filePoller"
                                service="foo:filePoller"
                                destinationService="foo:fileWriter">
        <sm:component>
        <spring:bean class="org.apache.servicemix.components.vfs.FilePoller">
        <property name="workManager" ref="workManager"/>
        <property name="deleteFile" value="false"/>
        <property name="path" value="ftp://servicemix:[EMAIL PROTECTED]"/>
        <property name="period" value="5000"/>
        </spring:bean>  
        </sm:component>
        </sm:activationSpec>
        </sm:activationSpecs>
        </sm:container> 
                                
        <!-- the work manager (thread pool) for this container -->
        <bean id="workManager" 
class="org.jencks.factory.WorkManagerFactoryBean">
        <property name="threadPoolSize" value="30"/>
        </bean>
        <bean id="marshaler"
class="org.apache.servicemix.components.util.BinaryFileMarshaler"
singleton="true"/>
</beans>
----------------------------------------------------------------EOConfig


Any advice ? did i miss something ?? i just want to move files without
converting/parsing them !
Any documentation can help me to get it ?

please help !
-- 
View this message in context: 
http://www.nabble.com/Tranfering-Binary-files-%3A-vfs-tf1868247.html#a5105350
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to