Hi Guillaume,
When I use this servicemix.xml file to read a text file, the servicemix
start fine, but when a file is thrown in the input directory, an POJO
error throws. Any tips on this will be help ful.
Servicemix.xml
<sm:activationSpec componentName="fileSender" service="foo:fileSender">
<sm:component>
<bean
xmlns="http://xbean.org/schemas/spring/1.0"
class="org.servicemix.components.file.FileWriter">
<property name="directory"
value="outbox" />
<bean
xmlns="http://xbean.org/schemas/spring/1.0" class="
org.servicemix.jbi.messaging.DefaultMarshaler">
</bean>
</bean>
</sm:component>
</sm:activationSpec>
Error
//servicemix.org/demo/}fileSender
[ERROR] PojoSupport - Error processing exchange
<javax.jbi.messaging.MessagingEx
ception: java.io.FileNotFoundException:
outbox\C:\servicemix-2.0.2\examples\file
-binding\inbox\test-file-new.txt (The filename, directory name, or volume
label
syntax is incorrect)>javax.jbi.messaging.MessagingException:
java.io.FileNotFoun
dException:
outbox\C:\servicemix-2.0.2\examples\file-binding\inbox\test-file-new
.txt (The filename, directory name, or volume label syntax is incorrect)
at
org.servicemix.components.file.FileWriter.process(FileWriter.java:127
)
at
org.servicemix.components.util.OutBinding.onMessageExchange(OutBindin
g.java:51)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(Deliv
eryChannelImpl.java:588)
at
org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:
171)
at
org.servicemix.jbi.nmr.flow.seda.SedaFlow.doSend(SedaFlow.java:140)
at
org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:119)
at
org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
at
org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.j
ava:567)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChann
elImpl.java:347)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryCha
nnelImpl.java:422)
at
org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryCha
nnelImpl.java:398)
at
org.servicemix.components.file.FilePoller.processFile(FilePoller.java
:220)
at
org.servicemix.components.file.FilePoller.processFileAndDelete(FilePo
ller.java:197)
Thanks
Mat
"Guillaume Nodet" <[EMAIL PROTECTED]>
04/19/2006 02:14 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
Re: Help in reading text files using the file-Binding example
Sorry, i mean
org.servicemix.jbi.messaging.DefaultMarshaler
-- Guillaume
On 4/19/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
> Have you tried org.servicemix.jbi.message.DefaultMarshaler instead ?
>
> Cheers,
> Guillaume Nodet
>
> On 4/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi,
> > I need to read a text file with large content and move it to an
different
> > directory, Iam new to servicemix and need some tips / help as to which
> > class to use. The current example uses an xml file.
> >
> > When I tried using the DefaultMarshaler class with text content file,
It
> > throws java.lang.ClassNotFoundException:
> > org.servicemix.client.DefaultMarshaler error.
> >
> >
> > Thanks
> > Mat
> > <sm:activationSpec componentName="fileSender"
> > service="foo:fileSender">
> > <sm:component>
> > <bean
> > xmlns="http://xbean.org/schemas/spring/1.0"
> > class="org.servicemix.components.file.FileWriter">
> > <property
name="directory"
> > value="outbox" />
> > <property
> > name="marshaler">
> > <bean
> > class="
> > org.servicemix.client.DefaultMarshaler">
> > <property
> > name="fileName">
> > <bean
> > class="org.servicemix.expression.JaxenStringXPathExpression">
> > <constructor-arg
> > value="concat('sample_', /sample/@id, '.xml')" />
> > </bean>
> > </property>
> > </bean>
> > </property>
> > </bean>
> > </sm:component>
> > </sm:activationSpec>
> >
>