This error happens because there is no fileName property in the
DefaultMarshaler class.
In facts, the DefaultMarshaler does not have any properties you can configure.

Cheers,
Guillaume Nodet

On 4/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> There was some space in front of the package. Once that was corrected, the
> following error poped up.
>
> The Servicemix.xml file
>
> <sm:activationSpecs>
>
>                         <!-- Write files to the outbox directory -->
>                         <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.jbi.messaging.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>
> Error :
> [INFO] DefaultListableBeanFactory - Destroying singletons in factory
> {org.spring
> framework.beans.factory.support.DefaultListableBeanFactory defining beans
> [jbi,w
> orkManager]; root of BeanFactory hierarchy}
> framework.beans.factory.support.DefaultListableBeanFactory defining beans
> [jbi,w
> orkManager]; root of BeanFactory hierarchy}
> Caught: org.springframework.beans.factory.BeanCreationException: Error
> creating
> bean with name 'org.servicemix.jbi.messaging.DefaultMarshaler#dc57db'
> defined in
>  file [C:\servicemix-2.0.2\examples\file-binding\servicemix.xml]: Error
> setting
> property values; nested exception is
> org.springframework.beans.NotWritableProper
> tyException: Invalid property 'fileName' of bean class
> [org.servicemix.jbi.messa
> ging.DefaultMarshaler]: Bean property 'fileName' is not writable or has an
> inval
> id setter method: Does the parameter type of the setter match the return
> type of
>  the getter?
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean wit
> h name 'org.servicemix.jbi.messaging.DefaultMarshaler#dc57db' defined in
> file [C
> :\servicemix-2.0.2\examples\file-binding\servicemix.xml]: Error setting
> property
>  values; nested exception is
> org.springframework.beans.NotWritablePropertyExcept
> ion: Invalid property 'fileName' of bean class
> [org.servicemix.jbi.messaging.Def
> aultMarshaler]: Bean property 'fileName' is not writable or has an invalid
> sette
> r method: Does the parameter type of the setter match the return type of
> the get
> ter?
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'fileNa
> me' of bean class [org.servicemix.jbi.messaging.DefaultMarshaler]: Bean
> property
>  'fileName' is not writable or has an invalid setter method: Does the
> parameter
> type of the setter match the return type of the getter?
>
> Thanks
>
>
>
>
>
> "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>
> > >
> >
>
>
>

Reply via email to