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:[email protected]] 
Sent: Friday, April 16, 2010 12:48 PM
To: [email protected]
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 <[email protected]> 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:[email protected]]
> Sent: Friday, April 16, 2010 10:31 AM
> To: [email protected]
> 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 <[email protected]> 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:[email protected]]
>> Sent: Friday, April 16, 2010 12:17 AM
>> To: [email protected]
>> 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 <[email protected]>
>> 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
>>>
>>>
>>
>

Reply via email to