You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Jason Chaffee <jc...@ebates.com> on 2010/04/15 22:28:28 UTC

Another Spring issue on servicemix 4 and use of Proxies

I am also seeing issues when spring tries to create a proxy.  Does
anyone know how to solve this?

 

Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: Could not initialize class $Proxy121

 

It really seems the most basic use cases of spring are not working in
servicemix 4.  It is very frustrating.  I got them to work in another
OSGI env and they worked in servcicemix 3, but not with OSGI and
servicemix 4.


Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Guillaume Nodet <gn...@gmail.com>.
Have you tried to restart servicemix ? It should act like a very big
refresh.

On Tue, Apr 20, 2010 at 03:12, Jason Chaffee <jc...@ebates.com> wrote:

> I rebuilt the org.apache.cxf.bundle and made it so that the
> org.springframeworkd.beans.factory.support is not optional and this problem
> went away.
>
> That begs the question, why isn't the optional class being resolved when I
> do a refresh?  I had to rebuild the bundle and make it non-optional for it
> to be resolved.
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 3:56 PM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> BTW, this is easy to reproduce.  Steps below:
>
> 1) Do a clean install of servicemix or Fuse.  I am currently using Fuse 4.2
> based on advice from this list.
>
> 2)  Install the aspect bundles from spring
>        karaf>osgi:install -s
> mvn:org.aspectj/com.springsource.org.aspectj.matcher/1.6.8.RELEASE
>        karaf>osgi:install -s
> mvn:org.aspectj/com.springsource.org.aspectj.runtime/1.6.8.RELEASE
>
> 3) Refresh Spring AOP
>
> After step 3, you will see this error:
>
> 15:52:51,688 | ERROR | xtenderThread-66 | ContextLoaderListener
>  | BundleApplicationContextListener   50 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in
> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
> Cannot create inner bean
> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type
> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean
> property 'mapProvider'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce'
> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
> Invocation of init method failed; nested exception is
> java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/support/ManagedSet
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 3:51 PM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> The problem is definitely with the org.apache.cxf.bundle because it imports
> Spring AOP.  Once I refresh Spring AOP to load the optional aspect classes
> then any bundle that imports org.apache.cxf.bundle and has
> META-INF/cxf/cxf.xml as an imported-package will get this error.
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 11:53 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> Here is the error.  I get the same error with servicmix-cxf-bc,
> examples-jaxrs, an my bundle when they all try to load cxf.xml file.
>
>
> 16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener
>  | BundleApplicationContextListener   50 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in
> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
> Cannot create inner bean
> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type
> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean
> property 'mapProvider'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3'
> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
> Invocation of init method failed; nested exception is
> java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/support/ManagedSet
>        at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
>        at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>        at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>        at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
>        at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>        at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>        at java.lang.Thread.run(Thread.java:637)
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Monday, April 19, 2010 1:34 AM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>
> which error do you have ?
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel Committer
>
> *******************************************************************
> - Blog : http://cmoulliard.blogspot.com
> - Twitter : http://twitter.com/cmoulliard
> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
>
>
> On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com>
> wrote:
> > I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However,
> when I did that, CXF stopped working.
> >
> >
> > -----Original Message-----
> > From: iocanel [mailto:canellos@upstreamsystems.com]
> > Sent: Sun 4/18/2010 11:44 AM
> > To: users@servicemix.apache.org
> > Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
> >
> >
> >
> > Jason Chaffee-3 wrote:
> >>
> >> Surely someone has gotten Aspectj and spring-aop to work??
> >>
> > :-)
> >
> > I have but not inside an osgi environment.
> > Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> > weaving of your aspects.
> >
> > -----
> > Ioannis Canellos
> > --
> > View this message in context:
> http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >
> >
> >
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Freeman Fang <fr...@gmail.com>.
Hi Chris,

To pick up this fix from cxf side, we only need update the cxf- 
bunde.jar in smx4.x kit.

And yeah, we should do a CXF component release after CXF 2.2.8 is out,  
as there're some other fixes after smx-cxf component 2010.01 release.

Best Regards
Freeman
On 2010-4-20, at 下午11:38, Chris Custine wrote:

> Awesome!  Thanks Freeman!
>
> FWIW, as soon as CXF 2.2.8 is released, we will probably do a CXF  
> component
> release to get this fix available to users.  I have seen this issue  
> come up
> several times lately.
>
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Felix :: http://felix.apache.org
> Apache Directory Server :: http://directory.apache.org
>
>
> On Tue, Apr 20, 2010 at 1:18 AM, Freeman Fang  
> <fr...@gmail.com>wrote:
>
>> Hi,
>>
>> I believe this is actually caused by when you install jpa-hibernate
>> feature, this add cglib 2.2.0 version in osgi container,  this can  
>> cause
>> cxf-bundle resolve to use cglib 2.2.0(before it use cglib 2.1.3), but
>> cxf-bundle optionaly import  org.springframework.beans which  
>> optionaly
>> import net.sf.cglib with version range [2.1.3, 2.2.0), this can cause
>> org.springframework.beans not available for cxf-bundle anymore as  
>> it's
>> optional.
>>
>> cxf-bundle import org.springframework.beans without optional can  
>> make both
>> cxf-bundle and spring-beans to choose cglib 2.1.3, but I think the  
>> better
>> solution is specify version range for cglib optional import for cxf- 
>> bundle.
>> Create CXF-2773[1] to track it.
>> [1]https://issues.apache.org/jira/browse/CXF-2773
>>
>>
>> Freeman
>>
>> On 2010-4-20, at 上午9:12, Jason Chaffee wrote:
>>
>> I rebuilt the org.apache.cxf.bundle and made it so that the
>>> org.springframeworkd.beans.factory.support is not optional and  
>>> this problem
>>> went away.
>>>
>>> That begs the question, why isn't the optional class being  
>>> resolved when I
>>> do a refresh?  I had to rebuild the bundle and make it non- 
>>> optional for it
>>> to be resolved.
>>>
>>> -----Original Message-----
>>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>>> Sent: Monday, April 19, 2010 3:56 PM
>>> To: users@servicemix.apache.org
>>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>> BTW, this is easy to reproduce.  Steps below:
>>>
>>> 1) Do a clean install of servicemix or Fuse.  I am currently using  
>>> Fuse
>>> 4.2 based on advice from this list.
>>>
>>> 2)  Install the aspect bundles from spring
>>>       karaf>osgi:install -s
>>> mvn:org.aspectj/com.springsource.org.aspectj.matcher/1.6.8.RELEASE
>>>       karaf>osgi:install -s
>>> mvn:org.aspectj/com.springsource.org.aspectj.runtime/1.6.8.RELEASE
>>>
>>> 3) Refresh Spring AOP
>>>
>>> After step 3, you will see this error:
>>>
>>> 15:52:51,688 | ERROR | xtenderThread-66 | ContextLoaderListener
>>> | BundleApplicationContextListener   50 | Application context  
>>> refresh
>>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
>>> config=osgibundle:/META-INF/spring/*.xml))
>>> org.springframework.beans.factory.BeanCreationException: Error  
>>> creating
>>> bean with name 'org.apache.cxf.binding.BindingFactoryManager'  
>>> defined in
>>> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>>> bnd.sym=servicemix-cxf-se]:
>>> Cannot create inner bean
>>> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type
>>> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting  
>>> bean
>>> property 'mapProvider'; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error  
>>> creating bean
>>> with name  
>>> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce'
>>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>>> bnd.sym=servicemix-cxf-se]:
>>> Invocation of init method failed; nested exception is
>>> java.lang.NoClassDefFoundError:
>>> org/springframework/beans/factory/support/ManagedSet
>>>
>>> -----Original Message-----
>>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>>> Sent: Monday, April 19, 2010 3:51 PM
>>> To: users@servicemix.apache.org
>>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>> The problem is definitely with the org.apache.cxf.bundle because it
>>> imports Spring AOP.  Once I refresh Spring AOP to load the  
>>> optional aspect
>>> classes then any bundle that imports org.apache.cxf.bundle and has
>>> META-INF/cxf/cxf.xml as an imported-package will get this error.
>>>
>>> -----Original Message-----
>>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>>> Sent: Monday, April 19, 2010 11:53 AM
>>> To: users@servicemix.apache.org
>>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>> Here is the error.  I get the same error with servicmix-cxf-bc,
>>> examples-jaxrs, an my bundle when they all try to load cxf.xml file.
>>>
>>>
>>> 16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener
>>> | BundleApplicationContextListener   50 | Application context  
>>> refresh
>>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
>>> config=osgibundle:/META-INF/spring/*.xml))
>>> org.springframework.beans.factory.BeanCreationException: Error  
>>> creating
>>> bean with name 'org.apache.cxf.binding.BindingFactoryManager'  
>>> defined in
>>> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>>> bnd.sym=servicemix-cxf-se]:
>>> Cannot create inner bean
>>> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type
>>> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting  
>>> bean
>>> property 'mapProvider'; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error  
>>> creating bean
>>> with name  
>>> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3'
>>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>>> bnd.sym=servicemix-cxf-se]:
>>> Invocation of init method failed; nested exception is
>>> java.lang.NoClassDefFoundError:
>>> org/springframework/beans/factory/support/ManagedSet
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .BeanDefinitionValueResolver 
>>> .resolveInnerBean(BeanDefinitionValueResolver.java:230)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .BeanDefinitionValueResolver 
>>> .resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>>>       at
>>> org 
>>> .springframework 
>>> .beans.factory.support.AbstractAutowireCapableBeanFactory 
>>> $1.run(AbstractAutowireCapableBeanFactory.java:409)
>>>       at java.security.AccessController.doPrivileged(Native Method)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .AbstractAutowireCapableBeanFactory 
>>> .createBean(AbstractAutowireCapableBeanFactory.java:380)
>>>       at
>>> org.springframework.beans.factory.support.AbstractBeanFactory 
>>> $1.getObject(AbstractBeanFactory.java:264)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .DefaultSingletonBeanRegistry 
>>> .getSingleton(DefaultSingletonBeanRegistry.java:222)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>>       at
>>> org 
>>> .springframework 
>>> .beans 
>>> .factory 
>>> .support 
>>> .DefaultListableBeanFactory 
>>> .preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>>>       at
>>> org 
>>> .springframework 
>>> .context 
>>> .support 
>>> .AbstractApplicationContext 
>>> .finishBeanFactoryInitialization(AbstractApplicationContext.java: 
>>> 728)
>>>       at
>>> org 
>>> .springframework 
>>> .osgi 
>>> .context 
>>> .support.AbstractDelegatedExecutionApplicationContext.access 
>>> $1600(AbstractDelegatedExecutionApplicationContext.java:69)
>>>       at
>>> org 
>>> .springframework 
>>> .osgi.context.support.AbstractDelegatedExecutionApplicationContext 
>>> $4.run(AbstractDelegatedExecutionApplicationContext.java:355)
>>>       at
>>> org 
>>> .springframework 
>>> .osgi 
>>> .util 
>>> .internal 
>>> .PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>       at
>>> org 
>>> .springframework 
>>> .osgi 
>>> .context 
>>> .support 
>>> .AbstractDelegatedExecutionApplicationContext 
>>> .completeRefresh(AbstractDelegatedExecutionApplicationContext.java: 
>>> 320)
>>>       at
>>> org 
>>> .springframework 
>>> .osgi 
>>> .extender 
>>> .internal 
>>> .dependencies.startup.DependencyWaiterApplicationContextExecutor 
>>> $ 
>>> CompleteRefreshTask 
>>> .run(DependencyWaiterApplicationContextExecutor.java:136)
>>>       at java.lang.Thread.run(Thread.java:637)
>>>
>>> -----Original Message-----
>>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>>> Sent: Monday, April 19, 2010 1:34 AM
>>> To: users@servicemix.apache.org
>>> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>> which error do you have ?
>>>
>>> Charles Moulliard
>>>
>>> Senior Enterprise Architect (J2EE, .NET, SOA)
>>> Apache Camel Committer
>>>
>>> *******************************************************************
>>> - Blog : http://cmoulliard.blogspot.com
>>> - Twitter : http://twitter.com/cmoulliard
>>> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>
>>>
>>>
>>> On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee  
>>> <jc...@ebates.com>
>>> wrote:
>>>
>>>> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.   
>>>> However,
>>>> when I did that, CXF stopped working.
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: iocanel [mailto:canellos@upstreamsystems.com]
>>>> Sent: Sun 4/18/2010 11:44 AM
>>>> To: users@servicemix.apache.org
>>>> Subject: RE: Another Spring issue on servicemix 4 and use of  
>>>> Proxies
>>>>
>>>>
>>>>
>>>> Jason Chaffee-3 wrote:
>>>>
>>>>>
>>>>> Surely someone has gotten Aspectj and spring-aop to work??
>>>>>
>>>>> :-)
>>>>
>>>> I have but not inside an osgi environment.
>>>> Untill the ServiceMix 4 and aspectj issue is resolved, try  
>>>> compile time
>>>> weaving of your aspects.
>>>>
>>>> -----
>>>> Ioannis Canellos
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>>
>>
>> --
>> Freeman Fang
>>
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Chris Custine <ch...@gmail.com>.
Awesome!  Thanks Freeman!

FWIW, as soon as CXF 2.2.8 is released, we will probably do a CXF component
release to get this fix available to users.  I have seen this issue come up
several times lately.

Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Felix :: http://felix.apache.org
Apache Directory Server :: http://directory.apache.org


On Tue, Apr 20, 2010 at 1:18 AM, Freeman Fang <fr...@gmail.com>wrote:

> Hi,
>
> I believe this is actually caused by when you install jpa-hibernate
> feature, this add cglib 2.2.0 version in osgi container,  this can cause
> cxf-bundle resolve to use cglib 2.2.0(before it use cglib 2.1.3), but
> cxf-bundle optionaly import  org.springframework.beans which optionaly
> import net.sf.cglib with version range [2.1.3, 2.2.0), this can cause
> org.springframework.beans not available for cxf-bundle anymore as it's
> optional.
>
> cxf-bundle import org.springframework.beans without optional can make both
> cxf-bundle and spring-beans to choose cglib 2.1.3, but I think the better
> solution is specify version range for cglib optional import for cxf-bundle.
> Create CXF-2773[1] to track it.
> [1]https://issues.apache.org/jira/browse/CXF-2773
>
>
> Freeman
>
> On 2010-4-20, at 上午9:12, Jason Chaffee wrote:
>
>  I rebuilt the org.apache.cxf.bundle and made it so that the
>> org.springframeworkd.beans.factory.support is not optional and this problem
>> went away.
>>
>> That begs the question, why isn't the optional class being resolved when I
>> do a refresh?  I had to rebuild the bundle and make it non-optional for it
>> to be resolved.
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 3:56 PM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> BTW, this is easy to reproduce.  Steps below:
>>
>> 1) Do a clean install of servicemix or Fuse.  I am currently using Fuse
>> 4.2 based on advice from this list.
>>
>> 2)  Install the aspect bundles from spring
>>        karaf>osgi:install -s
>> mvn:org.aspectj/com.springsource.org.aspectj.matcher/1.6.8.RELEASE
>>        karaf>osgi:install -s
>> mvn:org.aspectj/com.springsource.org.aspectj.runtime/1.6.8.RELEASE
>>
>> 3) Refresh Spring AOP
>>
>> After step 3, you will see this error:
>>
>> 15:52:51,688 | ERROR | xtenderThread-66 | ContextLoaderListener
>>  | BundleApplicationContextListener   50 | Application context refresh
>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
>> config=osgibundle:/META-INF/spring/*.xml))
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in
>> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
>> Cannot create inner bean
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type
>> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean
>> property 'mapProvider'; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating bean
>> with name 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce'
>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
>> Invocation of init method failed; nested exception is
>> java.lang.NoClassDefFoundError:
>> org/springframework/beans/factory/support/ManagedSet
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 3:51 PM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> The problem is definitely with the org.apache.cxf.bundle because it
>> imports Spring AOP.  Once I refresh Spring AOP to load the optional aspect
>> classes then any bundle that imports org.apache.cxf.bundle and has
>> META-INF/cxf/cxf.xml as an imported-package will get this error.
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 11:53 AM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> Here is the error.  I get the same error with servicmix-cxf-bc,
>> examples-jaxrs, an my bundle when they all try to load cxf.xml file.
>>
>>
>> 16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener
>>  | BundleApplicationContextListener   50 | Application context refresh
>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,
>> config=osgibundle:/META-INF/spring/*.xml))
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in
>> OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
>> Cannot create inner bean
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type
>> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean
>> property 'mapProvider'; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating bean
>> with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3'
>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]:
>> Invocation of init method failed; nested exception is
>> java.lang.NoClassDefFoundError:
>> org/springframework/beans/factory/support/ManagedSet
>>        at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
>>        at
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
>>        at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>        at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
>>        at
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>        at
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
>>        at
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>>        at java.lang.Thread.run(Thread.java:637)
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Monday, April 19, 2010 1:34 AM
>> To: users@servicemix.apache.org
>> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>>
>> which error do you have ?
>>
>> Charles Moulliard
>>
>> Senior Enterprise Architect (J2EE, .NET, SOA)
>> Apache Camel Committer
>>
>> *******************************************************************
>> - Blog : http://cmoulliard.blogspot.com
>> - Twitter : http://twitter.com/cmoulliard
>> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>>
>>
>> On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com>
>> wrote:
>>
>>> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However,
>>> when I did that, CXF stopped working.
>>>
>>>
>>> -----Original Message-----
>>> From: iocanel [mailto:canellos@upstreamsystems.com]
>>> Sent: Sun 4/18/2010 11:44 AM
>>> To: users@servicemix.apache.org
>>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>>
>>>
>>> Jason Chaffee-3 wrote:
>>>
>>>>
>>>> Surely someone has gotten Aspectj and spring-aop to work??
>>>>
>>>>  :-)
>>>
>>> I have but not inside an osgi environment.
>>> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
>>> weaving of your aspects.
>>>
>>> -----
>>> Ioannis Canellos
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>>
>>>
>
> --
> Freeman Fang
>
> ------------------------
> Open Source SOA: http://fusesource.com
>
>

Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
I tried this and it worked.  However, my bundle is having AOP issues  
again.  I will see if I can't track down the reason and let you know  
what I fond out.

Jason

On Apr 20, 2010, at 12:17 AM, "Freeman Fang" <fr...@gmail.com>  
wrote:

> Hi,
>
> I believe this is actually caused by when you install jpa-hibernate  
> feature, this add cglib 2.2.0 version in osgi container,  this can  
> cause cxf-bundle resolve to use cglib 2.2.0(before it use cglib  
> 2.1.3), but cxf-bundle optionaly import  org.springframework.beans  
> which optionaly import net.sf.cglib with version range [2.1.3,  
> 2.2.0), this can cause org.springframework.beans not available for  
> cxf-bundle anymore as it's optional.
>
> cxf-bundle import org.springframework.beans without optional can  
> make both cxf-bundle and spring-beans to choose cglib 2.1.3, but I  
> think the better solution is specify version range for cglib  
> optional import for cxf-bundle. Create CXF-2773[1] to track it.
> [1]https://issues.apache.org/jira/browse/CXF-2773
>
>
> Freeman
> On 2010-4-20, at 上午9:12, Jason Chaffee wrote:
>
>> I rebuilt the org.apache.cxf.bundle and made it so that the  
>> org.springframeworkd.beans.factory.support is not optional and this  
>> problem went away.
>>
>> That begs the question, why isn't the optional class being resolved  
>> when I do a refresh?  I had to rebuild the bundle and make it non- 
>> optional for it to be resolved.
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 3:56 PM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> BTW, this is easy to reproduce.  Steps below:
>>
>> 1) Do a clean install of servicemix or Fuse.  I am currently using  
>> Fuse 4.2 based on advice from this list.
>>
>> 2)  Install the aspect bundles from spring
>>    karaf>osgi:install -s mvn:org.aspectj/ 
>> com.springsource.org.aspectj.matcher/1.6.8.RELEASE
>>    karaf>osgi:install -s mvn:org.aspectj/ 
>> com.springsource.org.aspectj.runtime/1.6.8.RELEASE
>>
>> 3) Refresh Spring AOP
>>
>> After step 3, you will see this error:
>>
>> 15:52:51,688 | ERROR | xtenderThread-66 |  
>> ContextLoaderListener            |  
>> BundleApplicationContextListener   50 | Application context refresh  
>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,  
>> config=osgibundle:/META-INF/spring/*.xml))
>> org.springframework.beans.factory.BeanCreationException: Error  
>> creating bean with name  
>> 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi  
>> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>> bnd.sym=servicemix-cxf-se]: Cannot create inner bean  
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of  
>> type [org.apache.cxf.configuration.spring.SpringBeanMap] while  
>> setting bean property 'mapProvider'; nested exception is  
>> org.springframework.beans.factory.BeanCreationException: Error  
>> creating bean with name  
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce'  
>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>> bnd.sym=servicemix-cxf-se]: Invocation of init method failed;  
>> nested exception is java.lang.NoClassDefFoundError: org/ 
>> springframework/beans/factory/support/ManagedSet
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 3:51 PM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> The problem is definitely with the org.apache.cxf.bundle because it  
>> imports Spring AOP.  Once I refresh Spring AOP to load the optional  
>> aspect classes then any bundle that imports org.apache.cxf.bundle  
>> and has META-INF/cxf/cxf.xml as an imported-package will get this  
>> error.
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Monday, April 19, 2010 11:53 AM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>> Here is the error.  I get the same error with servicmix-cxf-bc,  
>> examples-jaxrs, an my bundle when they all try to load cxf.xml file.
>>
>>
>> 16:37:04,089 | ERROR | xtenderThread-62 |  
>> ContextLoaderListener            |  
>> BundleApplicationContextListener   50 | Application context refresh  
>> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,  
>> config=osgibundle:/META-INF/spring/*.xml))
>> org.springframework.beans.factory.BeanCreationException: Error  
>> creating bean with name  
>> 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi  
>> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>> bnd.sym=servicemix-cxf-se]: Cannot create inner bean  
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of  
>> type [org.apache.cxf.configuration.spring.SpringBeanMap] while  
>> setting bean property 'mapProvider'; nested exception is  
>> org.springframework.beans.factory.BeanCreationException: Error  
>> creating bean with name  
>> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3'  
>> defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
>> bnd.sym=servicemix-cxf-se]: Invocation of init method failed;  
>> nested exception is java.lang.NoClassDefFoundError: org/ 
>> springframework/beans/factory/support/ManagedSet
>>    at  
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean( 
>> BeanDefinitionValueResolver.java:230)
>>    at  
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary( 
>> BeanDefinitionValueResolver.java:117)
>>    at  
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues( 
>> AbstractAutowireCapableBeanFactory.java:1245)
>>    at  
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean( 
>> AbstractAutowireCapableBeanFactory.java:1010)
>>    at  
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean( 
>> AbstractAutowireCapableBeanFactory.java:472)
>>    at  
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$ 
>> 1.run(AbstractAutowireCapableBeanFactory.java:409)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at  
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean( 
>> AbstractAutowireCapableBeanFactory.java:380)
>>    at org.springframework.beans.factory.support.AbstractBeanFactory 
>> $1.getObject(AbstractBeanFactory.java:264)
>>    at  
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton( 
>> DefaultSingletonBeanRegistry.java:222)
>>    at  
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( 
>> AbstractBeanFactory.java:261)
>>    at  
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean( 
>> AbstractBeanFactory.java:185)
>>    at  
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean( 
>> AbstractBeanFactory.java:164)
>>    at  
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons( 
>> DefaultListableBeanFactory.java:429)
>>    at  
>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization( 
>> AbstractApplicationContext.java:728)
>>    at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$ 
>> 1600(AbstractDelegatedExecutionApplicationContext.java:69)
>>    at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$ 
>> 4.run(AbstractDelegatedExecutionApplicationContext.java:355)
>>    at  
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL( 
>> PrivilegedUtils.java:85)
>>    at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh( 
>> AbstractDelegatedExecutionApplicationContext.java:320)
>>    at  
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$ 
>> CompleteRefreshTask.run 
>> (DependencyWaiterApplicationContextExecutor.java:136)
>>    at java.lang.Thread.run(Thread.java:637)
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Monday, April 19, 2010 1:34 AM
>> To: users@servicemix.apache.org
>> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>>
>> which error do you have ?
>>
>> Charles Moulliard
>>
>> Senior Enterprise Architect (J2EE, .NET, SOA)
>> Apache Camel Committer
>>
>> *******************************************************************
>> - Blog : http://cmoulliard.blogspot.com
>> - Twitter : http://twitter.com/cmoulliard
>> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>>
>>
>> On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee  
>> <jc...@ebates.com> wrote:
>>> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.   
>>> However, when I did that, CXF stopped working.
>>>
>>>
>>> -----Original Message-----
>>> From: iocanel [mailto:canellos@upstreamsystems.com]
>>> Sent: Sun 4/18/2010 11:44 AM
>>> To: users@servicemix.apache.org
>>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>>
>>>
>>>
>>> Jason Chaffee-3 wrote:
>>>>
>>>> Surely someone has gotten Aspectj and spring-aop to work??
>>>>
>>> :-)
>>>
>>> I have but not inside an osgi environment.
>>> Untill the ServiceMix 4 and aspectj issue is resolved, try compile  
>>> time
>>> weaving of your aspects.
>>>
>>> -----
>>> Ioannis Canellos
>>> --
>>> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>>
>
>
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>

Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I believe this is actually caused by when you install jpa-hibernate  
feature, this add cglib 2.2.0 version in osgi container,  this can  
cause cxf-bundle resolve to use cglib 2.2.0(before it use cglib  
2.1.3), but cxf-bundle optionaly import  org.springframework.beans  
which optionaly import net.sf.cglib with version range [2.1.3, 2.2.0),  
this can cause org.springframework.beans not available for cxf-bundle  
anymore as it's optional.

cxf-bundle import org.springframework.beans without optional can make  
both cxf-bundle and spring-beans to choose cglib 2.1.3, but I think  
the better solution is specify version range for cglib optional import  
for cxf-bundle. Create CXF-2773[1] to track it.
[1]https://issues.apache.org/jira/browse/CXF-2773


Freeman
On 2010-4-20, at 上午9:12, Jason Chaffee wrote:

> I rebuilt the org.apache.cxf.bundle and made it so that the  
> org.springframeworkd.beans.factory.support is not optional and this  
> problem went away.
>
> That begs the question, why isn't the optional class being resolved  
> when I do a refresh?  I had to rebuild the bundle and make it non- 
> optional for it to be resolved.
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 3:56 PM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> BTW, this is easy to reproduce.  Steps below:
>
> 1) Do a clean install of servicemix or Fuse.  I am currently using  
> Fuse 4.2 based on advice from this list.
>
> 2)  Install the aspect bundles from spring
> 	karaf>osgi:install -s mvn:org.aspectj/ 
> com.springsource.org.aspectj.matcher/1.6.8.RELEASE
> 	karaf>osgi:install -s mvn:org.aspectj/ 
> com.springsource.org.aspectj.runtime/1.6.8.RELEASE
>
> 3) Refresh Spring AOP
>
> After step 3, you will see this error:
>
> 15:52:51,688 | ERROR | xtenderThread-66 |  
> ContextLoaderListener            |  
> BundleApplicationContextListener   50 | Application context refresh  
> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,  
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name  
> 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi  
> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
> bnd.sym=servicemix-cxf-se]: Cannot create inner bean  
> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type  
> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting  
> bean property 'mapProvider'; nested exception is  
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name  
> 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' defined  
> in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
> bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested  
> exception is java.lang.NoClassDefFoundError: org/springframework/ 
> beans/factory/support/ManagedSet
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 3:51 PM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> The problem is definitely with the org.apache.cxf.bundle because it  
> imports Spring AOP.  Once I refresh Spring AOP to load the optional  
> aspect classes then any bundle that imports org.apache.cxf.bundle  
> and has META-INF/cxf/cxf.xml as an imported-package will get this  
> error.
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Monday, April 19, 2010 11:53 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
> Here is the error.  I get the same error with servicmix-cxf-bc,  
> examples-jaxrs, an my bundle when they all try to load cxf.xml file.
>
>
> 16:37:04,089 | ERROR | xtenderThread-62 |  
> ContextLoaderListener            |  
> BundleApplicationContextListener   50 | Application context refresh  
> failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se,  
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name  
> 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi  
> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
> bnd.sym=servicemix-cxf-se]: Cannot create inner bean  
> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type  
> [org.apache.cxf.configuration.spring.SpringBeanMap] while setting  
> bean property 'mapProvider'; nested exception is  
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name  
> 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' defined  
> in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164| 
> bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested  
> exception is java.lang.NoClassDefFoundError: org/springframework/ 
> beans/factory/support/ManagedSet
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .BeanDefinitionValueResolver 
> .resolveInnerBean(BeanDefinitionValueResolver.java:230)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .BeanDefinitionValueResolver 
> .resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .populateBean(AbstractAutowireCapableBeanFactory.java:1010)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
> 	at  
> org 
> .springframework 
> .beans.factory.support.AbstractAutowireCapableBeanFactory 
> $1.run(AbstractAutowireCapableBeanFactory.java:409)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .createBean(AbstractAutowireCapableBeanFactory.java:380)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(AbstractBeanFactory.java:264)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultSingletonBeanRegistry 
> .getSingleton(DefaultSingletonBeanRegistry.java:222)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> 	at  
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultListableBeanFactory 
> .preInstantiateSingletons(DefaultListableBeanFactory.java:429)
> 	at  
> org 
> .springframework 
> .context 
> .support 
> .AbstractApplicationContext 
> .finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
> 	at  
> org 
> .springframework 
> .osgi 
> .context.support.AbstractDelegatedExecutionApplicationContext.access 
> $1600(AbstractDelegatedExecutionApplicationContext.java:69)
> 	at  
> org 
> .springframework 
> .osgi.context.support.AbstractDelegatedExecutionApplicationContext 
> $4.run(AbstractDelegatedExecutionApplicationContext.java:355)
> 	at  
> org 
> .springframework 
> .osgi 
> .util 
> .internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java: 
> 85)
> 	at  
> org 
> .springframework 
> .osgi 
> .context 
> .support 
> .AbstractDelegatedExecutionApplicationContext 
> .completeRefresh(AbstractDelegatedExecutionApplicationContext.java: 
> 320)
> 	at  
> org 
> .springframework 
> .osgi 
> .extender 
> .internal 
> .dependencies.startup.DependencyWaiterApplicationContextExecutor 
> $ 
> CompleteRefreshTask 
> .run(DependencyWaiterApplicationContextExecutor.java:136)
> 	at java.lang.Thread.run(Thread.java:637)
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Monday, April 19, 2010 1:34 AM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>
> which error do you have ?
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel Committer
>
> *******************************************************************
> - Blog : http://cmoulliard.blogspot.com
> - Twitter : http://twitter.com/cmoulliard
> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
>
>
> On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee  
> <jc...@ebates.com> wrote:
>> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.   
>> However, when I did that, CXF stopped working.
>>
>>
>> -----Original Message-----
>> From: iocanel [mailto:canellos@upstreamsystems.com]
>> Sent: Sun 4/18/2010 11:44 AM
>> To: users@servicemix.apache.org
>> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>>
>>
>>
>> Jason Chaffee-3 wrote:
>>>
>>> Surely someone has gotten Aspectj and spring-aop to work??
>>>
>> :-)
>>
>> I have but not inside an osgi environment.
>> Untill the ServiceMix 4 and aspectj issue is resolved, try compile  
>> time
>> weaving of your aspects.
>>
>> -----
>> Ioannis Canellos
>> --
>> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
I rebuilt the org.apache.cxf.bundle and made it so that the org.springframeworkd.beans.factory.support is not optional and this problem went away.

That begs the question, why isn't the optional class being resolved when I do a refresh?  I had to rebuild the bundle and make it non-optional for it to be resolved.

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 3:56 PM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

BTW, this is easy to reproduce.  Steps below:

1) Do a clean install of servicemix or Fuse.  I am currently using Fuse 4.2 based on advice from this list.

2)  Install the aspect bundles from spring
	karaf>osgi:install -s mvn:org.aspectj/com.springsource.org.aspectj.matcher/1.6.8.RELEASE
	karaf>osgi:install -s mvn:org.aspectj/com.springsource.org.aspectj.runtime/1.6.8.RELEASE

3) Refresh Spring AOP

After step 3, you will see this error:

15:52:51,688 | ERROR | xtenderThread-66 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 3:51 PM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

The problem is definitely with the org.apache.cxf.bundle because it imports Spring AOP.  Once I refresh Spring AOP to load the optional aspect classes then any bundle that imports org.apache.cxf.bundle and has META-INF/cxf/cxf.xml as an imported-package will get this error.

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 11:53 AM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

Here is the error.  I get the same error with servicmix-cxf-bc, examples-jaxrs, an my bundle when they all try to load cxf.xml file.


16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
	at java.lang.Thread.run(Thread.java:637)

-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Monday, April 19, 2010 1:34 AM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

which error do you have ?

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.
>
>
> -----Original Message-----
> From: iocanel [mailto:canellos@upstreamsystems.com]
> Sent: Sun 4/18/2010 11:44 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
>
>
> Jason Chaffee-3 wrote:
>>
>> Surely someone has gotten Aspectj and spring-aop to work??
>>
> :-)
>
> I have but not inside an osgi environment.
> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> weaving of your aspects.
>
> -----
> Ioannis Canellos
> --
> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>

RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
BTW, this is easy to reproduce.  Steps below:

1) Do a clean install of servicemix or Fuse.  I am currently using Fuse 4.2 based on advice from this list.

2)  Install the aspect bundles from spring
	karaf>osgi:install -s mvn:org.aspectj/com.springsource.org.aspectj.matcher/1.6.8.RELEASE
	karaf>osgi:install -s mvn:org.aspectj/com.springsource.org.aspectj.runtime/1.6.8.RELEASE

3) Refresh Spring AOP

After step 3, you will see this error:

15:52:51,688 | ERROR | xtenderThread-66 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#7d15b7ce' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 3:51 PM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

The problem is definitely with the org.apache.cxf.bundle because it imports Spring AOP.  Once I refresh Spring AOP to load the optional aspect classes then any bundle that imports org.apache.cxf.bundle and has META-INF/cxf/cxf.xml as an imported-package will get this error.

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 11:53 AM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

Here is the error.  I get the same error with servicmix-cxf-bc, examples-jaxrs, an my bundle when they all try to load cxf.xml file.


16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
	at java.lang.Thread.run(Thread.java:637)

-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Monday, April 19, 2010 1:34 AM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

which error do you have ?

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.
>
>
> -----Original Message-----
> From: iocanel [mailto:canellos@upstreamsystems.com]
> Sent: Sun 4/18/2010 11:44 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
>
>
> Jason Chaffee-3 wrote:
>>
>> Surely someone has gotten Aspectj and spring-aop to work??
>>
> :-)
>
> I have but not inside an osgi environment.
> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> weaving of your aspects.
>
> -----
> Ioannis Canellos
> --
> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>

RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
The problem is definitely with the org.apache.cxf.bundle because it imports Spring AOP.  Once I refresh Spring AOP to load the optional aspect classes then any bundle that imports org.apache.cxf.bundle and has META-INF/cxf/cxf.xml as an imported-package will get this error.

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Monday, April 19, 2010 11:53 AM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies

Here is the error.  I get the same error with servicmix-cxf-bc, examples-jaxrs, an my bundle when they all try to load cxf.xml file.


16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
	at java.lang.Thread.run(Thread.java:637)

-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Monday, April 19, 2010 1:34 AM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

which error do you have ?

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.
>
>
> -----Original Message-----
> From: iocanel [mailto:canellos@upstreamsystems.com]
> Sent: Sun 4/18/2010 11:44 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
>
>
> Jason Chaffee-3 wrote:
>>
>> Surely someone has gotten Aspectj and spring-aop to work??
>>
> :-)
>
> I have but not inside an osgi environment.
> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> weaving of your aspects.
>
> -----
> Ioannis Canellos
> --
> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>

RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
Here is the error.  I get the same error with servicmix-cxf-bc, examples-jaxrs, an my bundle when they all try to load cxf.xml file.


16:37:04,089 | ERROR | xtenderThread-62 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=servicemix-cxf-se, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.binding.BindingFactoryManager' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Cannot create inner bean 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' of type [org.apache.cxf.configuration.spring.SpringBeanMap] while setting bean property 'mapProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.configuration.spring.SpringBeanMap#5d40f8c3' defined in OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=164|bnd.sym=servicemix-cxf-se]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/ManagedSet
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
	at java.lang.Thread.run(Thread.java:637)

-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Monday, April 19, 2010 1:34 AM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

which error do you have ?

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.
>
>
> -----Original Message-----
> From: iocanel [mailto:canellos@upstreamsystems.com]
> Sent: Sun 4/18/2010 11:44 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
>
>
> Jason Chaffee-3 wrote:
>>
>> Surely someone has gotten Aspectj and spring-aop to work??
>>
> :-)
>
> I have but not inside an osgi environment.
> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> weaving of your aspects.
>
> -----
> Ioannis Canellos
> --
> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>

Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Charles Moulliard <cm...@gmail.com>.
which error do you have ?

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Sun, Apr 18, 2010 at 10:53 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.
>
>
> -----Original Message-----
> From: iocanel [mailto:canellos@upstreamsystems.com]
> Sent: Sun 4/18/2010 11:44 AM
> To: users@servicemix.apache.org
> Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
>
>
>
> Jason Chaffee-3 wrote:
>>
>> Surely someone has gotten Aspectj and spring-aop to work??
>>
> :-)
>
> I have but not inside an osgi environment.
> Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
> weaving of your aspects.
>
> -----
> Ioannis Canellos
> --
> View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>

RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
I got AspectJ and spring-aop to work in sericemix 4 using OSGI.  However, when I did that, CXF stopped working.


-----Original Message-----
From: iocanel [mailto:canellos@upstreamsystems.com]
Sent: Sun 4/18/2010 11:44 AM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies
 


Jason Chaffee-3 wrote:
> 
> Surely someone has gotten Aspectj and spring-aop to work??
> 
:-)

I have but not inside an osgi environment.
Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
weaving of your aspects.

-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by iocanel <ca...@upstreamsystems.com>.

Jason Chaffee-3 wrote:
> 
> Surely someone has gotten Aspectj and spring-aop to work??
> 
:-)

I have but not inside an osgi environment.
Untill the ServiceMix 4 and aspectj issue is resolved, try compile time
weaving of your aspects.

-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28284254.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
Hi Ioannis,

That fixed the proxy issue, only to give me another Aspectj issue.
Surely someone has gotten Aspectj and spring-aop to work??

: BeanPostProcessor before instantiation of bean failed; nested
exception is java.lang.NoClassDefFoundError:
org/aspectj/lang/reflect/AjTypeSystem
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory$1.run(AbstractAutowireCapableBeanFactory.java:405)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:164)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.get
BeansOfType(DefaultListableBeanFactory.java:308)
	at
org.springframework.context.support.AbstractApplicationContext.getBeansO
fType(AbstractApplicationContext.java:947)
	at
org.springframework.context.support.AbstractApplicationContext.registerL
isteners(AbstractApplicationContext.java:701)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionAppli
cationContext.access$1500(AbstractDelegatedExecutionApplicationContext.j
ava:69)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionAppli
cationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:35
1)
	at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustom
TCCL(PrivilegedUtils.java:85)
	at
org.springframework.osgi.context.support.AbstractDelegatedExecutionAppli
cationContext.completeRefresh(AbstractDelegatedExecutionApplicationConte
xt.java:320)
	at
org.springframework.osgi.extender.internal.dependencies.startup.Dependen
cyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWai
terApplicationContextExecutor.java:136)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError:
org/aspectj/lang/reflect/AjTypeSystem
	at
org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory
.isAspect(AbstractAspectJAdvisorFactory.java:120)
	at
org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoPro
xyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.j
ava:98)
	at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.isI
nfrastructureClass(AbstractAutoProxyCreator.java:381)
	at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.pos
tProcessBeforeInstantiation(AbstractAutoProxyCreator.java:281)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableB
eanFactory.java:791)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:
762)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory$1.run(AbstractAutowireCapableBeanFactory.java:399)
	... 16 more
Caused by: java.lang.ClassNotFoundException:
org.aspectj.lang.reflect.AjTypeSystem
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLo
ader.java:494)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.jav
a:410)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.jav
a:398)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
ltClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)

-----Original Message-----
From: iocanel [mailto:canellos@upstreamsystems.com] 
Sent: Friday, April 16, 2010 5:07 AM
To: users@servicemix.apache.org
Subject: RE: Another Spring issue on servicemix 4 and use of Proxies


Hi Jason,

I've read in an other thread that there is an issue with aspectj inside
service mix 4. So I guess that this problem is also affecting you.

Could you try and see what happens if you instruct spring to use CGLIB
proxies instead of dynamic proxies?

Something like:
<aop:aspectj-autoproxy proxy-target-class="true"/>


Finally, an other possibility would be to use compile time weaving using
spring-aspects. That's obviously not a clear solution but a workaround
which
helped me in the past in cases where the use of proxies broke things
(e.g.
proxying the bean class of a bean endpoint breaks the delivery channel
injection).


-----
Ioannis Canellos
-- 
View this message in context:
http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Pr
oxies-tp28260273p28266073.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by iocanel <ca...@upstreamsystems.com>.
Hi Jason,

I've read in an other thread that there is an issue with aspectj inside
service mix 4. So I guess that this problem is also affecting you.

Could you try and see what happens if you instruct spring to use CGLIB
proxies instead of dynamic proxies?

Something like:
<aop:aspectj-autoproxy proxy-target-class="true"/>


Finally, an other possibility would be to use compile time weaving using
spring-aspects. That's obviously not a clear solution but a workaround which
helped me in the past in cases where the use of proxies broke things (e.g.
proxying the bean class of a bean endpoint breaks the delivery channel
injection).


-----
Ioannis Canellos
-- 
View this message in context: http://old.nabble.com/Another-Spring-issue-on-servicemix-4-and-use-of-Proxies-tp28260273p28266073.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
That doesn't seem to be the case, because we have reproduced this issue
on 4 different machines now by doing clean installations of servicemix
and then osgi:install of the different bundles.

If I look at the webconsole, all of the import-packages are resolved
too.  It just doesn't seem to load correctly for whatever reason.  

It appears this happening the spring's aop logic and I wasn't able to
get <aop:config> to work so I removed for a different approach, but it
looks like spring uses aop for that approach too.

-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
Edstrom
Sent: Thursday, April 15, 2010 2:11 PM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

No, then I'd look at my imports, that the spring context is not
corrupted and that 
spring-dm didn't go away on a holiday...


On Apr 15, 2010, at 3:06 PM, Jason Chaffee wrote:

> I currently do not have a service reference, instead I was import the
> classes to be used and created in my restful service.  Currently, the
> only classes that aren't in my bundle are the Spring transaction and
> SessionFactory classes that are used for hibernate.  Are you
suggesting
> those objects should be created as services instead of beans?
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
> Edstrom
> Sent: Thursday, April 15, 2010 2:03 PM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
> 
> Put that on your service reference
> 
> On Apr 15, 2010, at 2:59 PM, Jason Chaffee wrote:
> 
>> Where should I put this configuration at?  I followed the jaxrs
> examples
>> and it does not have spring <osgi:service>.  It only has the
>> <jaxrs:server> from the cxf.
>> 
>> -----Original Message-----
>> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
>> Edstrom
>> Sent: Thursday, April 15, 2010 1:52 PM
>> To: users@servicemix.apache.org
>> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>> 
>> Are you consuming a service?
>> 
>> Try punting the classloading to the service provider
>> 
>> context-class-loader="service-provider"
>> 
>> On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:
>> 
>>> I am also seeing issues when spring tries to create a proxy.  Does
>>> anyone know how to solve this?
>>> 
>>> 
>>> 
>>> Initialization of bean failed; nested exception is
>>> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
>>> 
>>> 
>>> 
>>> It really seems the most basic use cases of spring are not working
in
>>> servicemix 4.  It is very frustrating.  I got them to work in
another
>>> OSGI env and they worked in servcicemix 3, but not with OSGI and
>>> servicemix 4.
>>> 
>> 
>> Johan Edstrom
>> 
>> joed@opennms.org
>> 
>> They that can give up essential liberty to purchase a little
temporary
>> safety, deserve neither liberty nor safety.
>> 
>> Benjamin Franklin, Historical Review of Pennsylvania, 1759
>> 
>> 
>> 
>> 
>> 
> 
> Johan Edstrom
> 
> joed@opennms.org
> 
> They that can give up essential liberty to purchase a little temporary
> safety, deserve neither liberty nor safety.
> 
> Benjamin Franklin, Historical Review of Pennsylvania, 1759
> 
> 
> 
> 
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Johan Edstrom <jo...@opennms.org>.
No, then I'd look at my imports, that the spring context is not corrupted and that 
spring-dm didn't go away on a holiday...


On Apr 15, 2010, at 3:06 PM, Jason Chaffee wrote:

> I currently do not have a service reference, instead I was import the
> classes to be used and created in my restful service.  Currently, the
> only classes that aren't in my bundle are the Spring transaction and
> SessionFactory classes that are used for hibernate.  Are you suggesting
> those objects should be created as services instead of beans?
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
> Edstrom
> Sent: Thursday, April 15, 2010 2:03 PM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
> 
> Put that on your service reference
> 
> On Apr 15, 2010, at 2:59 PM, Jason Chaffee wrote:
> 
>> Where should I put this configuration at?  I followed the jaxrs
> examples
>> and it does not have spring <osgi:service>.  It only has the
>> <jaxrs:server> from the cxf.
>> 
>> -----Original Message-----
>> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
>> Edstrom
>> Sent: Thursday, April 15, 2010 1:52 PM
>> To: users@servicemix.apache.org
>> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
>> 
>> Are you consuming a service?
>> 
>> Try punting the classloading to the service provider
>> 
>> context-class-loader="service-provider"
>> 
>> On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:
>> 
>>> I am also seeing issues when spring tries to create a proxy.  Does
>>> anyone know how to solve this?
>>> 
>>> 
>>> 
>>> Initialization of bean failed; nested exception is
>>> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
>>> 
>>> 
>>> 
>>> It really seems the most basic use cases of spring are not working in
>>> servicemix 4.  It is very frustrating.  I got them to work in another
>>> OSGI env and they worked in servcicemix 3, but not with OSGI and
>>> servicemix 4.
>>> 
>> 
>> Johan Edstrom
>> 
>> joed@opennms.org
>> 
>> They that can give up essential liberty to purchase a little temporary
>> safety, deserve neither liberty nor safety.
>> 
>> Benjamin Franklin, Historical Review of Pennsylvania, 1759
>> 
>> 
>> 
>> 
>> 
> 
> Johan Edstrom
> 
> joed@opennms.org
> 
> They that can give up essential liberty to purchase a little temporary
> safety, deserve neither liberty nor safety.
> 
> Benjamin Franklin, Historical Review of Pennsylvania, 1759
> 
> 
> 
> 
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
I currently do not have a service reference, instead I was import the
classes to be used and created in my restful service.  Currently, the
only classes that aren't in my bundle are the Spring transaction and
SessionFactory classes that are used for hibernate.  Are you suggesting
those objects should be created as services instead of beans?

-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
Edstrom
Sent: Thursday, April 15, 2010 2:03 PM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

Put that on your service reference

On Apr 15, 2010, at 2:59 PM, Jason Chaffee wrote:

> Where should I put this configuration at?  I followed the jaxrs
examples
> and it does not have spring <osgi:service>.  It only has the
> <jaxrs:server> from the cxf.
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
> Edstrom
> Sent: Thursday, April 15, 2010 1:52 PM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
> 
> Are you consuming a service?
> 
> Try punting the classloading to the service provider
> 
> context-class-loader="service-provider"
> 
> On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:
> 
>> I am also seeing issues when spring tries to create a proxy.  Does
>> anyone know how to solve this?
>> 
>> 
>> 
>> Initialization of bean failed; nested exception is
>> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
>> 
>> 
>> 
>> It really seems the most basic use cases of spring are not working in
>> servicemix 4.  It is very frustrating.  I got them to work in another
>> OSGI env and they worked in servcicemix 3, but not with OSGI and
>> servicemix 4.
>> 
> 
> Johan Edstrom
> 
> joed@opennms.org
> 
> They that can give up essential liberty to purchase a little temporary
> safety, deserve neither liberty nor safety.
> 
> Benjamin Franklin, Historical Review of Pennsylvania, 1759
> 
> 
> 
> 
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Johan Edstrom <jo...@opennms.org>.
Put that on your service reference

On Apr 15, 2010, at 2:59 PM, Jason Chaffee wrote:

> Where should I put this configuration at?  I followed the jaxrs examples
> and it does not have spring <osgi:service>.  It only has the
> <jaxrs:server> from the cxf.
> 
> -----Original Message-----
> From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
> Edstrom
> Sent: Thursday, April 15, 2010 1:52 PM
> To: users@servicemix.apache.org
> Subject: Re: Another Spring issue on servicemix 4 and use of Proxies
> 
> Are you consuming a service?
> 
> Try punting the classloading to the service provider
> 
> context-class-loader="service-provider"
> 
> On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:
> 
>> I am also seeing issues when spring tries to create a proxy.  Does
>> anyone know how to solve this?
>> 
>> 
>> 
>> Initialization of bean failed; nested exception is
>> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
>> 
>> 
>> 
>> It really seems the most basic use cases of spring are not working in
>> servicemix 4.  It is very frustrating.  I got them to work in another
>> OSGI env and they worked in servcicemix 3, but not with OSGI and
>> servicemix 4.
>> 
> 
> Johan Edstrom
> 
> joed@opennms.org
> 
> They that can give up essential liberty to purchase a little temporary
> safety, deserve neither liberty nor safety.
> 
> Benjamin Franklin, Historical Review of Pennsylvania, 1759
> 
> 
> 
> 
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
Where should I put this configuration at?  I followed the jaxrs examples
and it does not have spring <osgi:service>.  It only has the
<jaxrs:server> from the cxf.

-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
Edstrom
Sent: Thursday, April 15, 2010 1:52 PM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

Are you consuming a service?

Try punting the classloading to the service provider

context-class-loader="service-provider"

On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:

> I am also seeing issues when spring tries to create a proxy.  Does
> anyone know how to solve this?
> 
> 
> 
> Initialization of bean failed; nested exception is
> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
> 
> 
> 
> It really seems the most basic use cases of spring are not working in
> servicemix 4.  It is very frustrating.  I got them to work in another
> OSGI env and they worked in servcicemix 3, but not with OSGI and
> servicemix 4.
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






RE: Another Spring issue on servicemix 4 and use of Proxies

Posted by Jason Chaffee <jc...@ebates.com>.
I have a jaxrs service that is using spring to get data from a DB with
hibernate and then returning it with cxf-jaxrs.  It seems the DB stuff I
am doing with spring to create a HibernateSession and manage
transactions is causing all kinds of problems.  However, this
configuration works in other containers.

-----Original Message-----
From: Johan Edstrom [mailto:seijoed@gmail.com] On Behalf Of Johan
Edstrom
Sent: Thursday, April 15, 2010 1:52 PM
To: users@servicemix.apache.org
Subject: Re: Another Spring issue on servicemix 4 and use of Proxies

Are you consuming a service?

Try punting the classloading to the service provider

context-class-loader="service-provider"

On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:

> I am also seeing issues when spring tries to create a proxy.  Does
> anyone know how to solve this?
> 
> 
> 
> Initialization of bean failed; nested exception is
> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
> 
> 
> 
> It really seems the most basic use cases of spring are not working in
> servicemix 4.  It is very frustrating.  I got them to work in another
> OSGI env and they worked in servcicemix 3, but not with OSGI and
> servicemix 4.
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759






Re: Another Spring issue on servicemix 4 and use of Proxies

Posted by Johan Edstrom <jo...@opennms.org>.
Are you consuming a service?

Try punting the classloading to the service provider

context-class-loader="service-provider"

On Apr 15, 2010, at 2:28 PM, Jason Chaffee wrote:

> I am also seeing issues when spring tries to create a proxy.  Does
> anyone know how to solve this?
> 
> 
> 
> Initialization of bean failed; nested exception is
> java.lang.NoClassDefFoundError: Could not initialize class $Proxy121
> 
> 
> 
> It really seems the most basic use cases of spring are not working in
> servicemix 4.  It is very frustrating.  I got them to work in another
> OSGI env and they worked in servcicemix 3, but not with OSGI and
> servicemix 4.
> 

Johan Edstrom

joed@opennms.org

They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759