Hi

It is indeed proxy issue. CGLIB proxies and reflection (used by servicemix
bean) often have issues.
A workaround I used was to avoid proxy-ing my service-mix bean, by moving
spring annotation that result in proxy-ing in other bean.

An other possible solution would be to have servicemix-bean inject the
DeliveryChannel via setter if available (Maybe you could raise a JIRA about
it).

I have submitted some unit tests that reproduce this problem, but I haven't
heard from anyone yet.

On Thu, Nov 4, 2010 at 4:17 AM, angelonz <[email protected]>wrote:

>
> Hi,
>
> I'm trying to create a servicemix-bean POJO which will invoke Hibernate
> methods via service/dao classes I've created.  I'm using the
> spring-hibernate libraries for this.  I'm encountering problems deploying
> my
> SA, particularly with the @Resource DeliveryChannel not being injected.
> This is the case when I define my spring-hibernate configurations in the
> xbean.xml file which uses annotations; removing the hibernate definitions
> inject the DeliveryChannel just fine.  I've read from older posts that this
> is somewhat a proxy issue.  Is there a way to define the DeliveryChannel
> bean from the xbean.xml?
>
> I am using the smx3.3 web version by the way.  any help would be
> appreciated.
>
> Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
> No unique bean of type [javax.jbi.messaging.DeliveryChannel] is defined:
> Unsatisfied dependency of type [interface
> javax.jbi.messaging.DeliveryChannel]: expected at least 1 matching bean
>        at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/DeliveryChannel-not-injected-when-using-spring-hibernate-beans-in-xbean-xml-tp3249438p3249438.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
*Ioannis Canellos*
http://iocanel.blogspot.com

Reply via email to