You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ivan <iv...@dhousestudio.com> on 2008/06/20 17:04:55 UTC
Custom marshaller in servicemix-mail
Hi team!
I've tried to follow your example
<mail:poller service="test:myMailService"
endpoint="senderEndpoint"
sender="no-reply@servicemix.org"
connection="imap://lhein@testserver:143?password=myPass" >
<property name="marshaler">
<bean class="com.mycompany.MyMailMarshaler" />
</property>
</mail:poller>
at http://servicemix.apache.org/servicemix-mail.html.
And I got following:
<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.apache.servicemix.mail.MailPollerEndpoint' defined
in file
[F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.InvalidPropertyException: Invalid property
'property' of bean class
[org.apache.servicemix.mail.MailPollerEndpoint]: No property 'property'
found
at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
at
org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
at
org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:350)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
[F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.InvalidPropertyException: Invalid property
'property' of bean class
[org.apache.servicemix.mail.MailPollerEndpoint]: No property 'property'
found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
at
org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)
at
org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
at
org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
at
org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
... 13 more
Caused by: org.springframework.beans.InvalidPropertyException: Invalid
property 'property' of bean class
[org.apache.servicemix.mail.MailPollerEndpoint]: No property 'property'
found
at
org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:376)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
... 27 more
]]></stack-trace>
Have you tested it only on 3.3-SNAPTHOT?
I use servicemix-3.2.1 and servicemix-mail from 3.3-SNAPSHOT as
component. With default marshaller it works.
May be in SM-3.2.1 there is some bug which has been fixed in SM
3.3-SNAPSHOT?
I found xbean-server-3.2 jar used in SM-3.2.1 for creating
application context (may be it is cause of problem), but in
SM-3.3-SNAPSHOT it is used xbean-spring-3.4.1.jar.
How can I fix this problem? Does newer version of xbean.jar exist?
Thanks,
Truly yours,
Ivan Pryvalov.
Re: Custom marshaller in servicemix-mail
Posted by Lars Heinemann <la...@compart.net>.
Ivan,
have a look at
http://servicemix.apache.org/servicemix-mail.html
in section
"Mapping of headers and properties"
You could look for the sender address: MSG_TAG_FROM
Regards
Lars
On Monday 23 June 2008 13:50:43 ivan wrote:
> Hi!!
>
> I have one more question.
>
> For example, I've configured 2 mail:pollers. And I use own customMarshaler.
> How can I know what address (mail:poller id) I got mail from?
>
> Truly yours,
> Ivan Pryvalov.
>
> ivan пишет:
> > Hi !!
> >
> > I've passed this issue!
> >
> > Just using <bean name="customMarshaller" class="mycompany.MyMarshaller">
> > and <mail:poller marshaller="#customMarshaller" ...>
> >
> >
> > Truly yours, Ivan Pryvalov.
> >
> > Gert Vanthienen пишет:
> >> Ivan Pryvalov,
> >>
> >> Feel free to raise a JIRA for this, as it should work. For now, could
> >> you try with...
> >> <mail:poller>
> >> <mail:marshaler>
> >> <bean class="..."/>
> >> </mail:marshaler>
> >> </mail:poller>
> >>
> >> Regards,
> >>
> >> Gert
> >>
> >> ivan wrote:
> >>> Hi team!
> >>>
> >>> I've tried to follow your example
> >>>
> >>> <mail:poller service="test:myMailService"
> >>> endpoint="senderEndpoint"
> >>> sender="no-reply@servicemix.org"
> >>> connection="imap://lhein@testserver:143?password=myPass" >
> >>>
> >>> <property name="marshaler">
> >>> <bean class="com.mycompany.MyMailMarshaler" />
> >>> </property>
> >>>
> >>> </mail:poller>
> >>>
> >>>
> >>> at http://servicemix.apache.org/servicemix-mail.html.
> >>>
> >>>
> >>>
> >>> And I got following:
> >>>
> >>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationExcept
> >>>ion: org.springframework.beans.factory.BeanCreationException: Error
> >>> creating bean with name
> >>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
> >>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mai
> >>>l-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
> >>> Initialization of bean failed; nested exception is
> >>> org.springframework.beans.InvalidPropertyException: Invalid property
> >>> 'property' of bean class
> >>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> >>> 'property' found
> >>> at
> >>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService
> >>>(ServiceManagerRegistry.java:424)
> >>>
> >>> at
> >>> org.apache.xbean.kernel.standard.StandardKernel.registerService(Standar
> >>>dKernel.java:220)
> >>>
> >>> at
> >>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.ja
> >>>va:152)
> >>>
> >>> at
> >>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(Abstrac
> >>>tXBeanDeployer.java:83)
> >>>
> >>> at
> >>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServic
> >>>eUnitManager.java:88)
> >>>
> >>> at
> >>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceU
> >>>nitManager.java:69)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAsse
> >>>mbly(DeploymentService.java:508)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateService
> >>>Assembly(AutoDeploymentService.java:350)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive
> >>>(AutoDeploymentService.java:253)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirect
> >>>ory(AutoDeploymentService.java:647)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(Au
> >>>toDeploymentService.java:60)
> >>>
> >>> at
> >>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDep
> >>>loymentService.java:611)
> >>>
> >>> at java.util.TimerThread.mainLoop(Timer.java:512)
> >>> at java.util.TimerThread.run(Timer.java:462)
> >>> Caused by: org.springframework.beans.factory.BeanCreationException:
> >>> Error creating bean with name
> >>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
> >>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mai
> >>>l-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
> >>> Initialization of bean failed; nested exception is
> >>> org.springframework.beans.InvalidPropertyException: Invalid property
> >>> 'property' of bean class
> >>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> >>> 'property' found
> >>> at
> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFa
> >>>ctory.createBean(AbstractAutowireCapableBeanFactory.java:448)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObje
> >>>ct(AbstractBeanFactory.java:251)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> >>>getSingleton(DefaultSingletonBeanRegistry.java:156)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(A
> >>>bstractBeanFactory.java:248)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(A
> >>>bstractBeanFactory.java:160)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.DefaultListableBeanFactory.pr
> >>>eInstantiateSingletons(DefaultListableBeanFactory.java:287)
> >>>
> >>> at
> >>> org.springframework.context.support.AbstractApplicationContext.refresh(
> >>>AbstractApplicationContext.java:352)
> >>>
> >>> at
> >>> org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>
> >>>(SpringConfiguration.java:63)
> >>>
> >>> at
> >>> org.apache.xbean.server.spring.configuration.SpringConfigurationService
> >>>Factory.createService(SpringConfigurationServiceFactory.java:106)
> >>>
> >>> at
> >>> org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.ja
> >>>va:420)
> >>>
> >>> at
> >>> org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManag
> >>>er.java:200)
> >>>
> >>> at
> >>> org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.ca
> >>>ll(RegistryFutureTask.java:110)
> >>>
> >>> at
> >>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> >>> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> >>> at
> >>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService
> >>>(ServiceManagerRegistry.java:409)
> >>>
> >>> ... 13 more
> >>> Caused by: org.springframework.beans.InvalidPropertyException:
> >>> Invalid property 'property' of bean class
> >>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> >>> 'property' found
> >>> at
> >>> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrappe
> >>>rImpl.java:376)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFa
> >>>ctory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFa
> >>>ctory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
> >>>
> >>> at
> >>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFa
> >>>ctory.createBean(AbstractAutowireCapableBeanFactory.java:421)
> >>>
> >>> ... 27 more
> >>> ]]></stack-trace>
> >>>
> >>>
> >>>
> >>> Have you tested it only on 3.3-SNAPTHOT?
> >>>
> >>> I use servicemix-3.2.1 and servicemix-mail from 3.3-SNAPSHOT as
> >>> component. With default marshaller it works.
> >>>
> >>> May be in SM-3.2.1 there is some bug which has been fixed in SM
> >>> 3.3-SNAPSHOT?
> >>>
> >>>
> >>>
> >>> I found xbean-server-3.2 jar used in SM-3.2.1 for creating
> >>> application context (may be it is cause of problem), but in
> >>> SM-3.3-SNAPSHOT it is used xbean-spring-3.4.1.jar.
> >>>
> >>> How can I fix this problem? Does newer version of xbean.jar exist?
> >>>
> >>>
> >>> Thanks,
> >>> Truly yours,
> >>> Ivan Pryvalov.
Re: Custom marshaller in servicemix-mail
Posted by ivan <iv...@dhousestudio.com>.
Hi!!
I have one more question.
For example, I've configured 2 mail:pollers. And I use own customMarshaler.
How can I know what address (mail:poller id) I got mail from?
Truly yours,
Ivan Pryvalov.
ivan пишет:
> Hi !!
>
> I've passed this issue!
>
> Just using <bean name="customMarshaller" class="mycompany.MyMarshaller">
> and <mail:poller marshaller="#customMarshaller" ...>
>
>
> Truly yours, Ivan Pryvalov.
>
>
> Gert Vanthienen пишет:
>> Ivan Pryvalov,
>>
>> Feel free to raise a JIRA for this, as it should work. For now, could
>> you try with...
>> <mail:poller>
>> <mail:marshaler>
>> <bean class="..."/>
>> </mail:marshaler>
>> </mail:poller>
>>
>> Regards,
>>
>> Gert
>>
>>
>> ivan wrote:
>>> Hi team!
>>>
>>> I've tried to follow your example
>>>
>>> <mail:poller service="test:myMailService"
>>> endpoint="senderEndpoint"
>>> sender="no-reply@servicemix.org"
>>> connection="imap://lhein@testserver:143?password=myPass" >
>>>
>>> <property name="marshaler">
>>> <bean class="com.mycompany.MyMailMarshaler" />
>>> </property>
>>>
>>> </mail:poller>
>>>
>>>
>>> at http://servicemix.apache.org/servicemix-mail.html.
>>>
>>>
>>>
>>> And I got following:
>>>
>>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>>> org.springframework.beans.factory.BeanCreationException: Error
>>> creating bean with name
>>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
>>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
>>> Initialization of bean failed; nested exception is
>>> org.springframework.beans.InvalidPropertyException: Invalid property
>>> 'property' of bean class
>>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>>> 'property' found
>>> at
>>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>>
>>> at
>>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>>
>>> at
>>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>>
>>> at
>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>>
>>> at
>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>
>>> at
>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:350)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
>>>
>>> at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
>>>
>>> at java.util.TimerThread.mainLoop(Timer.java:512)
>>> at java.util.TimerThread.run(Timer.java:462)
>>> Caused by: org.springframework.beans.factory.BeanCreationException:
>>> Error creating bean with name
>>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
>>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
>>> Initialization of bean failed; nested exception is
>>> org.springframework.beans.InvalidPropertyException: Invalid property
>>> 'property' of bean class
>>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>>> 'property' found
>>> at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>>
>>> at
>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>>
>>> at
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>>>
>>> at
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>>>
>>> at
>>> org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
>>>
>>> at
>>> org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)
>>>
>>> at
>>> org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
>>>
>>> at
>>> org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
>>>
>>> at
>>> org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
>>>
>>> at
>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>>> at
>>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
>>>
>>> ... 13 more
>>> Caused by: org.springframework.beans.InvalidPropertyException:
>>> Invalid property 'property' of bean class
>>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>>> 'property' found
>>> at
>>> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:376)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>>>
>>> at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>>>
>>> ... 27 more
>>> ]]></stack-trace>
>>>
>>>
>>>
>>> Have you tested it only on 3.3-SNAPTHOT?
>>>
>>> I use servicemix-3.2.1 and servicemix-mail from 3.3-SNAPSHOT as
>>> component. With default marshaller it works.
>>>
>>> May be in SM-3.2.1 there is some bug which has been fixed in SM
>>> 3.3-SNAPSHOT?
>>>
>>>
>>>
>>> I found xbean-server-3.2 jar used in SM-3.2.1 for creating
>>> application context (may be it is cause of problem), but in
>>> SM-3.3-SNAPSHOT it is used xbean-spring-3.4.1.jar.
>>>
>>> How can I fix this problem? Does newer version of xbean.jar exist?
>>>
>>>
>>> Thanks,
>>> Truly yours,
>>> Ivan Pryvalov.
>>>
>>
>>
>
>
Re: Custom marshaller in servicemix-mail
Posted by ivan <iv...@dhousestudio.com>.
Hi !!
I've passed this issue!
Just using <bean name="customMarshaller" class="mycompany.MyMarshaller">
and <mail:poller marshaller="#customMarshaller" ...>
Truly yours, Ivan Pryvalov.
Gert Vanthienen пишет:
> Ivan Pryvalov,
>
> Feel free to raise a JIRA for this, as it should work. For now, could
> you try with...
> <mail:poller>
> <mail:marshaler>
> <bean class="..."/>
> </mail:marshaler>
> </mail:poller>
>
> Regards,
>
> Gert
>
>
> ivan wrote:
>> Hi team!
>>
>> I've tried to follow your example
>>
>> <mail:poller service="test:myMailService"
>> endpoint="senderEndpoint"
>> sender="no-reply@servicemix.org"
>> connection="imap://lhein@testserver:143?password=myPass" >
>>
>> <property name="marshaler">
>> <bean class="com.mycompany.MyMailMarshaler" />
>> </property>
>>
>> </mail:poller>
>>
>>
>> at http://servicemix.apache.org/servicemix-mail.html.
>>
>>
>>
>> And I got following:
>>
>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>> org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name
>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
>> Initialization of bean failed; nested exception is
>> org.springframework.beans.InvalidPropertyException: Invalid property
>> 'property' of bean class
>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>> 'property' found
>> at
>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>>
>> at
>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>>
>> at
>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>>
>> at
>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>>
>> at
>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>
>> at
>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>
>> at
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:350)
>>
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
>>
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
>>
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
>>
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
>>
>> at java.util.TimerThread.mainLoop(Timer.java:512)
>> at java.util.TimerThread.run(Timer.java:462)
>> Caused by: org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name
>> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
>> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
>> Initialization of bean failed; nested exception is
>> org.springframework.beans.InvalidPropertyException: Invalid property
>> 'property' of bean class
>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>> 'property' found
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
>>
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>>
>> at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>>
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>
>> at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>>
>> at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>>
>> at
>> org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
>>
>> at
>> org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)
>>
>> at
>> org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
>>
>> at
>> org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
>>
>> at
>> org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
>>
>> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>> at
>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
>>
>> ... 13 more
>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>> property 'property' of bean class
>> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
>> 'property' found
>> at
>> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:376)
>>
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
>>
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>>
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>>
>> ... 27 more
>> ]]></stack-trace>
>>
>>
>>
>> Have you tested it only on 3.3-SNAPTHOT?
>>
>> I use servicemix-3.2.1 and servicemix-mail from 3.3-SNAPSHOT as
>> component. With default marshaller it works.
>>
>> May be in SM-3.2.1 there is some bug which has been fixed in SM
>> 3.3-SNAPSHOT?
>>
>>
>>
>> I found xbean-server-3.2 jar used in SM-3.2.1 for creating
>> application context (may be it is cause of problem), but in
>> SM-3.3-SNAPSHOT it is used xbean-spring-3.4.1.jar.
>>
>> How can I fix this problem? Does newer version of xbean.jar exist?
>>
>>
>> Thanks,
>> Truly yours,
>> Ivan Pryvalov.
>>
>
>
Re: Custom marshaller in servicemix-mail
Posted by Gert Vanthienen <ge...@skynet.be>.
Ivan Pryvalov,
Feel free to raise a JIRA for this, as it should work. For now, could
you try with...
<mail:poller>
<mail:marshaler>
<bean class="..."/>
</mail:marshaler>
</mail:poller>
Regards,
Gert
ivan wrote:
> Hi team!
>
> I've tried to follow your example
>
> <mail:poller service="test:myMailService"
> endpoint="senderEndpoint"
> sender="no-reply@servicemix.org"
> connection="imap://lhein@testserver:143?password=myPass" >
>
> <property name="marshaler">
> <bean class="com.mycompany.MyMailMarshaler" />
> </property>
>
> </mail:poller>
>
>
> at http://servicemix.apache.org/servicemix-mail.html.
>
>
>
> And I got following:
>
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name
> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
> Initialization of bean failed; nested exception is
> org.springframework.beans.InvalidPropertyException: Invalid property
> 'property' of bean class
> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> 'property' found
> at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>
> at
> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>
> at
> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>
> at
> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>
> at
> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>
> at
> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>
> at
> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:350)
>
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
>
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
>
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
>
> at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
>
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name
> 'org.apache.servicemix.mail.MailPollerEndpoint' defined in file
> [F:\some_folder\apache-servicemix-3.2.1\data\smx\service-assemblies\mail-checker-sa\version_30\sus\servicemix-mail\mail-checker-su\xbean.xml]:
> Initialization of bean failed; nested exception is
> org.springframework.beans.InvalidPropertyException: Invalid property
> 'property' of bean class
> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> 'property' found
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>
> at
> org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
>
> at
> org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)
>
> at
> org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
>
> at
> org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
>
> at
> org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
>
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
>
> ... 13 more
> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
> property 'property' of bean class
> [org.apache.servicemix.mail.MailPollerEndpoint]: No property
> 'property' found
> at
> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:376)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1105)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
>
> ... 27 more
> ]]></stack-trace>
>
>
>
> Have you tested it only on 3.3-SNAPTHOT?
>
> I use servicemix-3.2.1 and servicemix-mail from 3.3-SNAPSHOT as
> component. With default marshaller it works.
>
> May be in SM-3.2.1 there is some bug which has been fixed in SM
> 3.3-SNAPSHOT?
>
>
>
> I found xbean-server-3.2 jar used in SM-3.2.1 for creating
> application context (may be it is cause of problem), but in
> SM-3.3-SNAPSHOT it is used xbean-spring-3.4.1.jar.
>
> How can I fix this problem? Does newer version of xbean.jar exist?
>
>
> Thanks,
> Truly yours,
> Ivan Pryvalov.
>