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 21:21:06 UTC

AOP in servicemix 4

Has anyone be able to use spring-aop in servicemix 4?  I am getting a
java.lang.NoClassDefFoundError:
org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.  I
installed the aspectjrt and aspectjweaver bundles from Spring and I also
tried putting them in the system path.   I have included all of their
packages in import-package as well.

 

Nothing seems to work.  I found a thread on fuse about someone having
this problem about a year ago, but there is not a solution listed there.
I was wondering if anyone is using aspects in servicemix4 with OSGI?

 

If I comment out the <aop> element in my spring file, then everything
loads file, but of course my aspect doesn't run.

 

Any help is appreciated.

 

Thanks,

 

Jason


Re: AOP in servicemix 4

Posted by Jason Chaffee <jc...@ebates.com>.
But it does.  The failure happens when another bundle imports the META- 
INF/cxf/cxf.xml from the cxf-bundle.  It causes several bundles to  
stop working.  Again, this only happens after installing aspectj  
bundles and then doing a refesh on the Spring AOP bundle.

Jason

On Apr 19, 2010, at 1:31 AM, "Charles Moulliard"  
<cm...@gmail.com> wrote:

> It seems that your example does not have references to Spring jar/ 
> classes :
>
> java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/support/BeanDefinitionBuilder
>
> Kind regards,
>
> 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 Fri, Apr 16, 2010 at 10:14 PM, Jason Chaffee  
> <jc...@ebates.com> wrote:
>> Here is the error.  This only happens after I did a refresh.  This  
>> is the examples bundle and it broke after the refresh.
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException:  
>> Unexpected exception parsing XML document from URL [bundleentry:// 
>> 197.fwk948252856/META-INF/spring/beans.xml]; nested exception is  
>> java.lang.NoClassDefFoundError: org/springframework/beans/factory/ 
>> support/BeanDefinitionBuilder
>>        at  
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions( 
>> XmlBeanDefinitionReader.java:420)
>>        at  
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions( 
>> XmlBeanDefinitionReader.java:342)
>>        at  
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions( 
>> XmlBeanDefinitionReader.java:310)
>>        at  
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions( 
>> AbstractBeanDefinitionReader.java:143)
>>        at  
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions( 
>> AbstractBeanDefinitionReader.java:178)
>>        at  
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions( 
>> AbstractBeanDefinitionReader.java:149)
>>        at  
>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions( 
>> OsgiBundleXmlApplicationContext.java:176)
>>        at  
>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions( 
>> OsgiBundleXmlApplicationContext.java:142)
>>        at  
>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory( 
>> AbstractRefreshableApplicationContext.java:123)
>>        at  
>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory( 
>> AbstractApplicationContext.java:422)
>>        at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$ 
>> 800(AbstractDelegatedExecutionApplicationContext.java:69)
>>        at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$ 
>> 3.run(AbstractDelegatedExecutionApplicationContext.java:269)
>>        at  
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL( 
>> PrivilegedUtils.java:85)
>>        at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh( 
>> AbstractDelegatedExecutionApplicationContext.java:247)
>>        at  
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne( 
>> DependencyWaiterApplicationContextExecutor.java:222)
>>        at  
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh( 
>> DependencyWaiterApplicationContextExecutor.java:175)
>>        at  
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh( 
>> AbstractDelegatedExecutionApplicationContext.java:175)
>>        at  
>> org.springframework.osgi.extender.internal.activator.ContextLoaderListener$ 
>> 2.run(ContextLoaderListener.java:718)
>>        at java.lang.Thread.run(Thread.java:637)
>> Caused by: java.lang.NoClassDefFoundError: org/springframework/ 
>> beans/factory/support/BeanDefinitionBuilder
>>        at  
>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.mapToProperty( 
>> AbstractBeanDefinitionParser.java:379)
>>        at  
>> org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.mapAttribute( 
>> JAXRSServerFactoryBeanDefinitionParser.java:72)
>>        at  
>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseAttributes( 
>> AbstractBeanDefinitionParser.java:103)
>>        at  
>> org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse( 
>> AbstractBeanDefinitionParser.java:67)
>>        at  
>> org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.doParse( 
>> JAXRSServerFactoryBeanDefinitionParser.java:112)
>>        at  
>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal( 
>> AbstractSingleBeanDefinitionParser.java:84)
>>        at  
>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse( 
>> AbstractBeanDefinitionParser.java:56)
>>        at  
>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse 
>> (NamespaceHandlerSupport.java:69)
>>        at  
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement( 
>> BeanDefinitionParserDelegate.java:1297)
>>        at  
>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement( 
>> BeanDefinitionParserDelegate.java:1287)
>>        at  
>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions( 
>> DefaultBeanDefinitionDocumentReader.java:135)
>>        at  
>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions( 
>> DefaultBeanDefinitionDocumentReader.java:92)
>>        at  
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions( 
>> XmlBeanDefinitionReader.java:507)
>>        at  
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions( 
>> XmlBeanDefinitionReader.java:398)
>>        ... 18 more
>>
>> -----Original Message-----
>> From: Jason Chaffee [mailto:jchaffee@ebates.com]
>> Sent: Friday, April 16, 2010 1:09 PM
>> To: users@servicemix.apache.org
>> Subject: RE: AOP in servicemix 4
>>
>> This got me past the aspect error, now I have an error with the cxf- 
>> bundle.  It has org.springframework.beans.factory.support as  
>> optional and no matter how many times I refresh, it won't add it to  
>> the import-package.  This is now my failure.
>>
>> Any ideas why the refresh isn't work here?
>>
>> -----Original Message-----
>> From: Stan Lewis [mailto:gashcrumb@gmail.com]
>> Sent: Friday, April 16, 2010 12:48 PM
>> To: users@servicemix.apache.org
>> Subject: Re: AOP in servicemix 4
>>
>> Yes, once you've installed the AspectJ bundles you just need to do an
>> "osgi:refresh" on the Spring AOP bundle, that'll make the container  
>> go
>> and re-resolve all of the optional imports, after which if you do
>> "packages:imports" on the Spring AOP bundle you should see it's
>> importing the AspectJ stuff.
>>
>> On Fri, Apr 16, 2010 at 3:34 PM, Jason Chaffee  
>> <jc...@ebates.com> wrote:
>>> I think this may be the problem:
>>>
>>> Spring AOP does not have the aspectj packages listed in imported  
>>> packages in the webconsole.  The manifest has them, but has  
>>> resolution as optional.  Is there a way to force resolution?
>>>
>>> org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional,
>>> org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional,
>>> org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional,
>>> org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional,
>>> org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>> org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)";  
>>> resolution:=optional,
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>>> Sent: Friday, April 16, 2010 10:31 AM
>>> To: users@servicemix.apache.org
>>> Subject: Re: AOP in servicemix 4
>>>
>>> So there is a classloading issue inside one of these jar files !!
>>>
>>>
>>> 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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee  
>>> <jc...@ebates.com> wrote:
>>>> Hi Charles,
>>>>
>>>> Yes, I tried to installed the wrapped versions and I am currently  
>>>> using
>>>> spring osgi bundles for both of them.  I get the same error  
>>>> either way.
>>>> I even tried to move them into system directory thinking maybe they
>>>> needed to be loaded sooner, but that didn't work either.
>>>>
>>>> -----Original Message-----
>>>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>>>> Sent: Friday, April 16, 2010 12:17 AM
>>>> To: users@servicemix.apache.org
>>>> Subject: Re: AOP in servicemix 4
>>>>
>>>> Hi Jason,
>>>>
>>>> Have you tried to install these two bundles aspectj weaver and  
>>>> runtime
>>>> like
>>>> this :
>>>>
>>>> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
>>>> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>>>>
>>>> We have a snasphot bundle available under servicemix :
>>>> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
>>>> .6.8
>>>> but not yet published into an official release (probably in  
>>>> SMX4.3).
>>>>
>>>> Remark : If you have installed the spring feature, you should see  
>>>> the
>>>> AOP
>>>> bundles of Spring and aopalliance already installed
>>>>
>>>> [  33] [Active     ] [            ] [       ] [   60] Apache  
>>>> ServiceMix
>>>> Bundles: aopalliance-1.0 (1.0.0.3)
>>>> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
>>>> (2.5.6.SEC01)
>>>>
>>>> Kind regards,
>>>>
>>>> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee  
>>>> <jc...@ebates.com>
>>>> wrote:
>>>>
>>>>> Has anyone be able to use spring-aop in servicemix 4?  I am  
>>>>> getting a
>>>>> java.lang.NoClassDefFoundError:
>>>>> org/aspectj/weaver/reflect/ReflectionWorld 
>>>>> $ReflectionWorldException.
>>>> I
>>>>> installed the aspectjrt and aspectjweaver bundles from Spring  
>>>>> and I
>>>> also
>>>>> tried putting them in the system path.   I have included all of  
>>>>> their
>>>>> packages in import-package as well.
>>>>>
>>>>>
>>>>>
>>>>> Nothing seems to work.  I found a thread on fuse about someone  
>>>>> having
>>>>> this problem about a year ago, but there is not a solution listed
>>>> there.
>>>>> I was wondering if anyone is using aspects in servicemix4 with  
>>>>> OSGI?
>>>>>
>>>>>
>>>>>
>>>>> If I comment out the <aop> element in my spring file, then  
>>>>> everything
>>>>> loads file, but of course my aspect doesn't run.
>>>>>
>>>>>
>>>>>
>>>>> Any help is appreciated.
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>
>>>>> Jason
>>>>>
>>>>>
>>>>
>>>
>>

Re: AOP in servicemix 4

Posted by Charles Moulliard <cm...@gmail.com>.
It seems that your example does not have references to Spring jar/classes :

java.lang.NoClassDefFoundError:
org/springframework/beans/factory/support/BeanDefinitionBuilder

Kind regards,

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 Fri, Apr 16, 2010 at 10:14 PM, Jason Chaffee <jc...@ebates.com> wrote:
> Here is the error.  This only happens after I did a refresh.  This is the examples bundle and it broke after the refresh.
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundleentry://197.fwk948252856/META-INF/spring/beans.xml]; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/BeanDefinitionBuilder
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
>        at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
>        at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
>        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
>        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
>        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
>        at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
>        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
>        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
>        at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
>        at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
>        at java.lang.Thread.run(Thread.java:637)
> Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/BeanDefinitionBuilder
>        at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.mapToProperty(AbstractBeanDefinitionParser.java:379)
>        at org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.mapAttribute(JAXRSServerFactoryBeanDefinitionParser.java:72)
>        at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseAttributes(AbstractBeanDefinitionParser.java:103)
>        at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:67)
>        at org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.doParse(JAXRSServerFactoryBeanDefinitionParser.java:112)
>        at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>        at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
>        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
>        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
>        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
>        ... 18 more
>
> -----Original Message-----
> From: Jason Chaffee [mailto:jchaffee@ebates.com]
> Sent: Friday, April 16, 2010 1:09 PM
> To: users@servicemix.apache.org
> Subject: RE: AOP in servicemix 4
>
> This got me past the aspect error, now I have an error with the cxf-bundle.  It has org.springframework.beans.factory.support as optional and no matter how many times I refresh, it won't add it to the import-package.  This is now my failure.
>
> Any ideas why the refresh isn't work here?
>
> -----Original Message-----
> From: Stan Lewis [mailto:gashcrumb@gmail.com]
> Sent: Friday, April 16, 2010 12:48 PM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> Yes, once you've installed the AspectJ bundles you just need to do an
> "osgi:refresh" on the Spring AOP bundle, that'll make the container go
> and re-resolve all of the optional imports, after which if you do
> "packages:imports" on the Spring AOP bundle you should see it's
> importing the AspectJ stuff.
>
> On Fri, Apr 16, 2010 at 3:34 PM, Jason Chaffee <jc...@ebates.com> wrote:
>> I think this may be the problem:
>>
>> Spring AOP does not have the aspectj packages listed in imported packages in the webconsole.  The manifest has them, but has resolution as optional.  Is there a way to force resolution?
>>
>> org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
>> org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
>>
>>
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Friday, April 16, 2010 10:31 AM
>> To: users@servicemix.apache.org
>> Subject: Re: AOP in servicemix 4
>>
>> So there is a classloading issue inside one of these jar files !!
>>
>>
>> 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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
>>> Hi Charles,
>>>
>>> Yes, I tried to installed the wrapped versions and I am currently using
>>> spring osgi bundles for both of them.  I get the same error either way.
>>> I even tried to move them into system directory thinking maybe they
>>> needed to be loaded sooner, but that didn't work either.
>>>
>>> -----Original Message-----
>>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>>> Sent: Friday, April 16, 2010 12:17 AM
>>> To: users@servicemix.apache.org
>>> Subject: Re: AOP in servicemix 4
>>>
>>> Hi Jason,
>>>
>>> Have you tried to install these two bundles aspectj weaver and runtime
>>> like
>>> this :
>>>
>>> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
>>> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>>>
>>> We have a snasphot bundle available under servicemix :
>>> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
>>> .6.8
>>> but not yet published into an official release (probably in SMX4.3).
>>>
>>> Remark : If you have installed the spring feature, you should see the
>>> AOP
>>> bundles of Spring and aopalliance already installed
>>>
>>> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
>>> Bundles: aopalliance-1.0 (1.0.0.3)
>>> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
>>> (2.5.6.SEC01)
>>>
>>> Kind regards,
>>>
>>> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
>>> wrote:
>>>
>>>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>>>> java.lang.NoClassDefFoundError:
>>>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
>>> I
>>>> installed the aspectjrt and aspectjweaver bundles from Spring and I
>>> also
>>>> tried putting them in the system path.   I have included all of their
>>>> packages in import-package as well.
>>>>
>>>>
>>>>
>>>> Nothing seems to work.  I found a thread on fuse about someone having
>>>> this problem about a year ago, but there is not a solution listed
>>> there.
>>>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>>>
>>>>
>>>>
>>>> If I comment out the <aop> element in my spring file, then everything
>>>> loads file, but of course my aspect doesn't run.
>>>>
>>>>
>>>>
>>>> Any help is appreciated.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Jason
>>>>
>>>>
>>>
>>
>

RE: AOP in servicemix 4

Posted by Jason Chaffee <jc...@ebates.com>.
Here is the error.  This only happens after I did a refresh.  This is the examples bundle and it broke after the refresh.

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundleentry://197.fwk948252856/META-INF/spring/beans.xml]; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/BeanDefinitionBuilder
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/BeanDefinitionBuilder
	at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.mapToProperty(AbstractBeanDefinitionParser.java:379)
	at org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.mapAttribute(JAXRSServerFactoryBeanDefinitionParser.java:72)
	at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.parseAttributes(AbstractBeanDefinitionParser.java:103)
	at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.doParse(AbstractBeanDefinitionParser.java:67)
	at org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.doParse(JAXRSServerFactoryBeanDefinitionParser.java:112)
	at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
	... 18 more

-----Original Message-----
From: Jason Chaffee [mailto:jchaffee@ebates.com] 
Sent: Friday, April 16, 2010 1:09 PM
To: users@servicemix.apache.org
Subject: RE: AOP in servicemix 4

This got me past the aspect error, now I have an error with the cxf-bundle.  It has org.springframework.beans.factory.support as optional and no matter how many times I refresh, it won't add it to the import-package.  This is now my failure.

Any ideas why the refresh isn't work here?

-----Original Message-----
From: Stan Lewis [mailto:gashcrumb@gmail.com] 
Sent: Friday, April 16, 2010 12:48 PM
To: users@servicemix.apache.org
Subject: Re: AOP in servicemix 4

Yes, once you've installed the AspectJ bundles you just need to do an
"osgi:refresh" on the Spring AOP bundle, that'll make the container go
and re-resolve all of the optional imports, after which if you do
"packages:imports" on the Spring AOP bundle you should see it's
importing the AspectJ stuff.

On Fri, Apr 16, 2010 at 3:34 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I think this may be the problem:
>
> Spring AOP does not have the aspectj packages listed in imported packages in the webconsole.  The manifest has them, but has resolution as optional.  Is there a way to force resolution?
>
> org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
>
>
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Friday, April 16, 2010 10:31 AM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> So there is a classloading issue inside one of these jar files !!
>
>
> 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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
>> Hi Charles,
>>
>> Yes, I tried to installed the wrapped versions and I am currently using
>> spring osgi bundles for both of them.  I get the same error either way.
>> I even tried to move them into system directory thinking maybe they
>> needed to be loaded sooner, but that didn't work either.
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Friday, April 16, 2010 12:17 AM
>> To: users@servicemix.apache.org
>> Subject: Re: AOP in servicemix 4
>>
>> Hi Jason,
>>
>> Have you tried to install these two bundles aspectj weaver and runtime
>> like
>> this :
>>
>> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
>> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>>
>> We have a snasphot bundle available under servicemix :
>> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
>> .6.8
>> but not yet published into an official release (probably in SMX4.3).
>>
>> Remark : If you have installed the spring feature, you should see the
>> AOP
>> bundles of Spring and aopalliance already installed
>>
>> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
>> Bundles: aopalliance-1.0 (1.0.0.3)
>> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
>> (2.5.6.SEC01)
>>
>> Kind regards,
>>
>> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
>> wrote:
>>
>>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>>> java.lang.NoClassDefFoundError:
>>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
>> I
>>> installed the aspectjrt and aspectjweaver bundles from Spring and I
>> also
>>> tried putting them in the system path.   I have included all of their
>>> packages in import-package as well.
>>>
>>>
>>>
>>> Nothing seems to work.  I found a thread on fuse about someone having
>>> this problem about a year ago, but there is not a solution listed
>> there.
>>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>>
>>>
>>>
>>> If I comment out the <aop> element in my spring file, then everything
>>> loads file, but of course my aspect doesn't run.
>>>
>>>
>>>
>>> Any help is appreciated.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>
>

RE: AOP in servicemix 4

Posted by Jason Chaffee <jc...@ebates.com>.
This got me past the aspect error, now I have an error with the cxf-bundle.  It has org.springframework.beans.factory.support as optional and no matter how many times I refresh, it won't add it to the import-package.  This is now my failure.

Any ideas why the refresh isn't work here?

-----Original Message-----
From: Stan Lewis [mailto:gashcrumb@gmail.com] 
Sent: Friday, April 16, 2010 12:48 PM
To: users@servicemix.apache.org
Subject: Re: AOP in servicemix 4

Yes, once you've installed the AspectJ bundles you just need to do an
"osgi:refresh" on the Spring AOP bundle, that'll make the container go
and re-resolve all of the optional imports, after which if you do
"packages:imports" on the Spring AOP bundle you should see it's
importing the AspectJ stuff.

On Fri, Apr 16, 2010 at 3:34 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I think this may be the problem:
>
> Spring AOP does not have the aspectj packages listed in imported packages in the webconsole.  The manifest has them, but has resolution as optional.  Is there a way to force resolution?
>
> org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
>
>
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Friday, April 16, 2010 10:31 AM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> So there is a classloading issue inside one of these jar files !!
>
>
> 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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
>> Hi Charles,
>>
>> Yes, I tried to installed the wrapped versions and I am currently using
>> spring osgi bundles for both of them.  I get the same error either way.
>> I even tried to move them into system directory thinking maybe they
>> needed to be loaded sooner, but that didn't work either.
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Friday, April 16, 2010 12:17 AM
>> To: users@servicemix.apache.org
>> Subject: Re: AOP in servicemix 4
>>
>> Hi Jason,
>>
>> Have you tried to install these two bundles aspectj weaver and runtime
>> like
>> this :
>>
>> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
>> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>>
>> We have a snasphot bundle available under servicemix :
>> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
>> .6.8
>> but not yet published into an official release (probably in SMX4.3).
>>
>> Remark : If you have installed the spring feature, you should see the
>> AOP
>> bundles of Spring and aopalliance already installed
>>
>> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
>> Bundles: aopalliance-1.0 (1.0.0.3)
>> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
>> (2.5.6.SEC01)
>>
>> Kind regards,
>>
>> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
>> wrote:
>>
>>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>>> java.lang.NoClassDefFoundError:
>>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
>> I
>>> installed the aspectjrt and aspectjweaver bundles from Spring and I
>> also
>>> tried putting them in the system path.   I have included all of their
>>> packages in import-package as well.
>>>
>>>
>>>
>>> Nothing seems to work.  I found a thread on fuse about someone having
>>> this problem about a year ago, but there is not a solution listed
>> there.
>>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>>
>>>
>>>
>>> If I comment out the <aop> element in my spring file, then everything
>>> loads file, but of course my aspect doesn't run.
>>>
>>>
>>>
>>> Any help is appreciated.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>
>

Re: AOP in servicemix 4

Posted by Stan Lewis <ga...@gmail.com>.
Yes, once you've installed the AspectJ bundles you just need to do an
"osgi:refresh" on the Spring AOP bundle, that'll make the container go
and re-resolve all of the optional imports, after which if you do
"packages:imports" on the Spring AOP bundle you should see it's
importing the AspectJ stuff.

On Fri, Apr 16, 2010 at 3:34 PM, Jason Chaffee <jc...@ebates.com> wrote:
> I think this may be the problem:
>
> Spring AOP does not have the aspectj packages listed in imported packages in the webconsole.  The manifest has them, but has resolution as optional.  Is there a way to force resolution?
>
> org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional,
> org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,
>
>
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Friday, April 16, 2010 10:31 AM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> So there is a classloading issue inside one of these jar files !!
>
>
> 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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
>> Hi Charles,
>>
>> Yes, I tried to installed the wrapped versions and I am currently using
>> spring osgi bundles for both of them.  I get the same error either way.
>> I even tried to move them into system directory thinking maybe they
>> needed to be loaded sooner, but that didn't work either.
>>
>> -----Original Message-----
>> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Sent: Friday, April 16, 2010 12:17 AM
>> To: users@servicemix.apache.org
>> Subject: Re: AOP in servicemix 4
>>
>> Hi Jason,
>>
>> Have you tried to install these two bundles aspectj weaver and runtime
>> like
>> this :
>>
>> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
>> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>>
>> We have a snasphot bundle available under servicemix :
>> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
>> .6.8
>> but not yet published into an official release (probably in SMX4.3).
>>
>> Remark : If you have installed the spring feature, you should see the
>> AOP
>> bundles of Spring and aopalliance already installed
>>
>> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
>> Bundles: aopalliance-1.0 (1.0.0.3)
>> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
>> (2.5.6.SEC01)
>>
>> Kind regards,
>>
>> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
>> wrote:
>>
>>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>>> java.lang.NoClassDefFoundError:
>>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
>> I
>>> installed the aspectjrt and aspectjweaver bundles from Spring and I
>> also
>>> tried putting them in the system path.   I have included all of their
>>> packages in import-package as well.
>>>
>>>
>>>
>>> Nothing seems to work.  I found a thread on fuse about someone having
>>> this problem about a year ago, but there is not a solution listed
>> there.
>>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>>
>>>
>>>
>>> If I comment out the <aop> element in my spring file, then everything
>>> loads file, but of course my aspect doesn't run.
>>>
>>>
>>>
>>> Any help is appreciated.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Jason
>>>
>>>
>>
>

RE: AOP in servicemix 4

Posted by Jason Chaffee <jc...@ebates.com>.
I think this may be the problem:

Spring AOP does not have the aspectj packages listed in imported packages in the webconsole.  The manifest has them, but has resolution as optional.  Is there a way to force resolution?

org.aspectj.bridge; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.lang; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.lang.annotation; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.lang.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.runtime.internal; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.util; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver.ast; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver.internal.tools; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver.patterns; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver.reflect; version="[1.5.4, 2.0.0)"; resolution:=optional, 
org.aspectj.weaver.tools; version="[1.5.4, 2.0.0)"; resolution:=optional,



-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Friday, April 16, 2010 10:31 AM
To: users@servicemix.apache.org
Subject: Re: AOP in servicemix 4

So there is a classloading issue inside one of these jar files !!


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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
> Hi Charles,
>
> Yes, I tried to installed the wrapped versions and I am currently using
> spring osgi bundles for both of them.  I get the same error either way.
> I even tried to move them into system directory thinking maybe they
> needed to be loaded sooner, but that didn't work either.
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Friday, April 16, 2010 12:17 AM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> Hi Jason,
>
> Have you tried to install these two bundles aspectj weaver and runtime
> like
> this :
>
> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>
> We have a snasphot bundle available under servicemix :
> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
> .6.8
> but not yet published into an official release (probably in SMX4.3).
>
> Remark : If you have installed the spring feature, you should see the
> AOP
> bundles of Spring and aopalliance already installed
>
> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
> Bundles: aopalliance-1.0 (1.0.0.3)
> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
> (2.5.6.SEC01)
>
> Kind regards,
>
> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
> wrote:
>
>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>> java.lang.NoClassDefFoundError:
>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
> I
>> installed the aspectjrt and aspectjweaver bundles from Spring and I
> also
>> tried putting them in the system path.   I have included all of their
>> packages in import-package as well.
>>
>>
>>
>> Nothing seems to work.  I found a thread on fuse about someone having
>> this problem about a year ago, but there is not a solution listed
> there.
>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>
>>
>>
>> If I comment out the <aop> element in my spring file, then everything
>> loads file, but of course my aspect doesn't run.
>>
>>
>>
>> Any help is appreciated.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Jason
>>
>>
>

Re: AOP in servicemix 4

Posted by Charles Moulliard <cm...@gmail.com>.
So there is a classloading issue inside one of these jar files !!


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 Fri, Apr 16, 2010 at 7:29 PM, Jason Chaffee <jc...@ebates.com> wrote:
> Hi Charles,
>
> Yes, I tried to installed the wrapped versions and I am currently using
> spring osgi bundles for both of them.  I get the same error either way.
> I even tried to move them into system directory thinking maybe they
> needed to be loaded sooner, but that didn't work either.
>
> -----Original Message-----
> From: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Sent: Friday, April 16, 2010 12:17 AM
> To: users@servicemix.apache.org
> Subject: Re: AOP in servicemix 4
>
> Hi Jason,
>
> Have you tried to install these two bundles aspectj weaver and runtime
> like
> this :
>
> osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
> osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8
>
> We have a snasphot bundle available under servicemix :
> https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
> .6.8
> but not yet published into an official release (probably in SMX4.3).
>
> Remark : If you have installed the spring feature, you should see the
> AOP
> bundles of Spring and aopalliance already installed
>
> [  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
> Bundles: aopalliance-1.0 (1.0.0.3)
> [  36] [Active     ] [            ] [       ] [   60] Spring AOP
> (2.5.6.SEC01)
>
> Kind regards,
>
> 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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
> wrote:
>
>> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
>> java.lang.NoClassDefFoundError:
>> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
> I
>> installed the aspectjrt and aspectjweaver bundles from Spring and I
> also
>> tried putting them in the system path.   I have included all of their
>> packages in import-package as well.
>>
>>
>>
>> Nothing seems to work.  I found a thread on fuse about someone having
>> this problem about a year ago, but there is not a solution listed
> there.
>> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>>
>>
>>
>> If I comment out the <aop> element in my spring file, then everything
>> loads file, but of course my aspect doesn't run.
>>
>>
>>
>> Any help is appreciated.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Jason
>>
>>
>

RE: AOP in servicemix 4

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

Yes, I tried to installed the wrapped versions and I am currently using
spring osgi bundles for both of them.  I get the same error either way.
I even tried to move them into system directory thinking maybe they
needed to be loaded sooner, but that didn't work either.

-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Sent: Friday, April 16, 2010 12:17 AM
To: users@servicemix.apache.org
Subject: Re: AOP in servicemix 4

Hi Jason,

Have you tried to install these two bundles aspectj weaver and runtime
like
this :

osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8

We have a snasphot bundle available under servicemix :
https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1
.6.8
but not yet published into an official release (probably in SMX4.3).

Remark : If you have installed the spring feature, you should see the
AOP
bundles of Spring and aopalliance already installed

[  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
Bundles: aopalliance-1.0 (1.0.0.3)
[  36] [Active     ] [            ] [       ] [   60] Spring AOP
(2.5.6.SEC01)

Kind regards,

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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com>
wrote:

> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
> java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.
I
> installed the aspectjrt and aspectjweaver bundles from Spring and I
also
> tried putting them in the system path.   I have included all of their
> packages in import-package as well.
>
>
>
> Nothing seems to work.  I found a thread on fuse about someone having
> this problem about a year ago, but there is not a solution listed
there.
> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>
>
>
> If I comment out the <aop> element in my spring file, then everything
> loads file, but of course my aspect doesn't run.
>
>
>
> Any help is appreciated.
>
>
>
> Thanks,
>
>
>
> Jason
>
>

Re: AOP in servicemix 4

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Jason,

Have you tried to install these two bundles aspectj weaver and runtime like
this :

osgi:install -s wrap:mvn:org.aspectj/aspectjrt/1.6.8
osgi:install -s wrap:mvn:org.aspectj/aspectjweaver/1.6.8

We have a snasphot bundle available under servicemix :
https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/aspectj-1.6.8
but not yet published into an official release (probably in SMX4.3).

Remark : If you have installed the spring feature, you should see the AOP
bundles of Spring and aopalliance already installed

[  33] [Active     ] [            ] [       ] [   60] Apache ServiceMix
Bundles: aopalliance-1.0 (1.0.0.3)
[  36] [Active     ] [            ] [       ] [   60] Spring AOP
(2.5.6.SEC01)

Kind regards,

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 Thu, Apr 15, 2010 at 9:21 PM, Jason Chaffee <jc...@ebates.com> wrote:

> Has anyone be able to use spring-aop in servicemix 4?  I am getting a
> java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException.  I
> installed the aspectjrt and aspectjweaver bundles from Spring and I also
> tried putting them in the system path.   I have included all of their
> packages in import-package as well.
>
>
>
> Nothing seems to work.  I found a thread on fuse about someone having
> this problem about a year ago, but there is not a solution listed there.
> I was wondering if anyone is using aspects in servicemix4 with OSGI?
>
>
>
> If I comment out the <aop> element in my spring file, then everything
> loads file, but of course my aspect doesn't run.
>
>
>
> Any help is appreciated.
>
>
>
> Thanks,
>
>
>
> Jason
>
>