Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ajdt-dev] Workaround forbug:java.lang.NoSuchMethodError:makeAdviceSig & new bug

Ok after much digging, I finally found my error. I get the cflow stack bug
because the loadtime weaving system hits an error on weaving...

This is caused because a pointcut is referring to a missing classfile at
runtime:
org.aspectj.weaver.BCException: illegal change to pointcut declaration:
jaxRpcClientCall(BindingTypePattern(javax.xml.rpc.Call, 0))

This causes the loadtime weaving system in registerAspects to abort all
further registration! Even with a -proceedOnError argument (so does a
missing aspect definition too).

The end result of this is to make it tricky to ship a collection of optional
library aspects that can apply if you have the relevant libraries in your
system (in this case a JAX RPC monitor for Apache Axis). Instead, users of a
library like this MUST configure their aop.xml file to only use the aspects
that they have the relevant runtime dependencies for.

I think it would be a lot better to allow registering the other aspects in
the system, and registering the rest when there's an error, and not to stop
registration just for a missing aspect entry. This would make things a lot
more resilient when configuring and distributing aspect libraries,
especially ones that want to auto-detect dependencies rather than forcing
preconfiguration!

The reason I get the weird cflow stack bug is because the system hits this
error and misses the exclude option in my aop.xml, resulting in reweaving (I
think inconsistently).

Also, I had a -noWarn in my aop.xml file because there are a lot of verbose
messages being emitted that I expect, and I wanted to make the output
cleaner, but this swallowed all these critical abort "warnings"

-----Original Message-----
From: ajdt-dev-bounces@xxxxxxxxxxx [mailto:ajdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Ron Bodkin
Sent: Sunday, September 11, 2005 11:50 AM
To: andrew.clement@xxxxxxxxx; 'AspectJ Development Tools developer
discussions'
Subject: RE: [ajdt-dev] Workaround
forbug:java.lang.NoSuchMethodError:makeAdviceSig & new bug

Hi Andy,

I see this problem with ant builds; when I do a clean (deletes the entire
target directory) and rebuild, I still get the problem. I am narrowing it
down: it can be time consuming when you have a large project with multiple
pieces involved, since it means carefully removing dependent parts. 

-----Original Message-----
From: ajdt-dev-bounces@xxxxxxxxxxx [mailto:ajdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Andy Clement
Sent: Sunday, September 11, 2005 9:35 AM
To: AspectJ Development Tools developer discussions
Subject: Re: [ajdt-dev] Workaround for
bug:java.lang.NoSuchMethodError:makeAdviceSig & new bug

Ron,

For the cflowStack problem - is *all* the code that in some way
references the cflow pointcut being compiled together in one go? or
are you building a library then reusing it? *or* does it possibly only
happen when incremental compilation has occurred?

I've had a suspicion about a problem in this area but it should only
be possible if some kind of separate/incremental compilation occurs...
 if the whole application is compiled together in one go - then its
not the bug I'm thinking of.

Andy.

On 11/09/05, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
>  
>  
> 
> I forgot to mention the new bug I'm trying to narrow down.I get errors
like
> this when I have a chain of non-static inner classes (worker objects)
inside
> aspects where there's a cflow on the execution of methods on these
classes.
> Does this look at all familiar, or should I dig in and start narrowing it
> down? 
> 
>   
> 
> java.lang.NoSuchFieldError: ajc$cflowStack$1 
> 
>         at
> glassbox.inspector.monitor.AbstractRequestMonitor$RequestContext.exec
> 
> ute(AbstractRequestMonitor.aj:47) 
> 
>         at
> glassbox.inspector.monitor.operation.AbstractOperationMonitor.ajc$aro
> 
>
und$glassbox_inspector_monitor_operation_AbstractOperationMonitor$2$b156e73f
_aro
> 
> undBody4(AbstractOperationMonitor.aj:88) 
> 
>         at
> glassbox.inspector.monitor.operation.AbstractOperationMonitor.ajc$aro
> 
>
und$glassbox_inspector_monitor_operation_AbstractOperationMonitor$2$b156e73f
(Abs
> 
> tractOperationMonitor.aj:1) 
> 
>   
> 
> Any idea what might be causing this? 
> 
>
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev

_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev



Back to the top