Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] setting -javaagent:aspectjweaver.jar results inClassCircularityError

Hi,

Sorry I am really quite late coming into this discussion with my responses.

> Note that I have no aspects defined so there is no compilation involved.

What do you hope to see if you exclude everything?   (and why not
'exclude within="*"' rather than an include that nothing will match?)
I thought the problem we were trying to resolve was a
ClassCircularityError - I'm not quite sure why you have moved to
having no aspects?  Are you, for now, just trying to get the message
out about the weaver shutting down due to there being no aspects?

> I still get the same error.

is this the classcircularityerror? or something else?

> 4. The VM is not started using java(w).exe on command line. There is a
> container that starts it using JNI

I really don't know what difference this makes, I have no experience
setting an agent via any other route than -javaagent...  If it works
when started 'normally' but fails when launched in this special way,
then it must be contributing to the issue, but as I mentioned above, I
thought we were investigating a ClassCircularity problem, are we also
looking at a problem where the agent sometimes isn't started up?

> 5. There is a custom classloader.

As I say, as long as it is behaving, it will get a weaver instance
associated and weaving will occur.

> I am running out of ideas and steam and will be really grateful for
> any help you can provide. Thank you in advance.

All I can say is there seem to be a lot of factors in the mix here and
trying to debug them all at once seems a bit tricky.  There are some
trace options you can turn on for the weaver, documented here:
http://www.eclipse.org/aspectj/doc/released/pdguide/trace.html . I
never use them myself but they may tell you if anything is running.

Why not use compile time weaving just to get something behaving,
perhaps even fix the ClassCircularity issue via compile time weaving
rather than attempting to resolve it in ltw.  If you compile time
weave and run the result it will give you the same behaviour as ltw -
producing the same CCE which we can then fix without worrying about
LTW configuration.  Then you can look at getting the LTW config setup
right...

Andy


Back to the top