You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by srini <sr...@gmail.com> on 2012/10/08 18:50:02 UTC

Servicemix 4.4.2: Cannot convert to required type [org.aopalliance.aop.Advice] for property 'advice'

Hi, I am facing issues with migrating servicemix3 SA (JBI based) to
servicemix 4.4.2. 

Servicemix4 is throwing errors while loading Spring configurations of an SU
whch is using interceptors.
Error:  Error creating bean with name 'retryInterceptor' defined in URL
[file:C:/spring-config.xml]: Initialization of bean failed; nested exception
is org.springframework.beans.ConversionNotSupportedException: Failed to
convert property value of type 'my.DAOInterceptor' to required type
'org.aopalliance.aop.Advice' for property 'advice'; nested exception is
java.lang.IllegalStateException: Cannot convert value of type
[my.DAOInterceptor] to required type [org.aopalliance.aop.Advice] for
property 'advice': no matching editors or conversion strategy found
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

Additional Details: 
1. I am trying to deploy smx3 SA(zip file) as-is after installing JBI
feature in smx4.
2. my.DAOInterceptor is implementing
org.aopalliance.intercept.MethodInterceptor;
3. Configuration in spring-config.xml:
      <bean id="retryDAOInterceptor" class="my.DAOInterceptor"/>
         <bean id="retryInterceptor"
class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
            <property name="advice" ref="retryDAOInterceptor"/>
            <property name="pattern">
            <value>.*</value>
        </property>
     </bean>
4. Project is using spring 2.5.6. I have tried with spring 3.0.6 but getting
same error.
5. It does not appear to be an issue with multiple jars in classpath, as
removing aopalliance-1.0.jar from the SA is resulting in ClassNotFound
exception during deployment.
6. The same SA deploys successfully in smx3.3

Any help would be greatly appreciated.




--
View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-4-4-2-Cannot-convert-to-required-type-org-aopalliance-aop-Advice-for-property-advice-tp5714669.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.