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:[email protected]]
Sent: Monday, April 19, 2010 3:56 PM
To: [email protected]
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:[email protected]]
Sent: Monday, April 19, 2010 3:51 PM
To: [email protected]
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:[email protected]]
Sent: Monday, April 19, 2010 11:53 AM
To: [email protected]
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:[email protected]]
Sent: Monday, April 19, 2010 1:34 AM
To: [email protected]
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
<[email protected]> 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:[email protected]]
Sent: Sun 4/18/2010 11:44 AM
To: [email protected]
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.