[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] bug in eclipse compiler?

Hi -

My "test" scenario is about the problem with indirect dependencies.
As I mentioned before the second chain of calls (I mean execution of: compile & then ajc2) works correctly.
It is true that in this case  inpath == target directory , but this is not a problem.
In this case SUN compiler compiles everything (correctly) and then weaving with ajc is completed  without problems!
It gives proof that AspectJ weaver works well.
set-up of Xlint properties:  cantFindType & cantFindTypeAffectingJPMatch to any special values is not necessary. :-).

First scenario (execution of ajc1) demonstrates the problem!
In this case ajc doing "whole job" i.e. compilation + weaving.
Compilation fails with a following result:

c:\projects\example2>c:\aspectj1.5\bin\ajc -argfile classesbuilddef1.lst
C:\projects\example2\src\main\java\z\Z.java:12 [error] The type com.ibm.CORBA.iiop.ObjectResolver cannot be resolved. It is indirectly referenced from required .class files
return container.getEJSDeployedSupport(null);

1 error

So this implies that the problem is in compiler not in weaver! (I hope)
BTW modification of xlint.properties file has no effect in this case :-(.

Thanks & have a nice day

p.s. I understand that problem like this happens very occasionally but ...

Wes Isberg wrote:
Hi -

I think things will work if set up ajc right.

In the second .lst file your arguments suffer from putting the target directory on the inpath.  This is never correct.  Include
all the relevant sources and affected types in the list of source
files or the inpath, and include all types required to resolve them
on the classpath.  (There was a recent thread on point, titled
"badWeaverState exception on iajc w/out prior clean".)

ajc looks up the type chain further than javac when processing
aspects.  To disable this, create an xlint.properties file and
override the values for cantFindType and cantFindTypeAffectingJPMatch.  See the ajc documentation for more

Thanks -

------------Original Message------------
From: Juraj Burian <jubu@xxxxxxxx>
To: "AspectJ developer discussions" <aspectj-dev@xxxxxxxxxxx>
Date: Thu, Mar-9-2006 9:16 AM
Subject: [aspectj-dev] bug in eclipse compiler?

I have problem with indirect dependencies  in compilation mode.
I thing that the problem lays in eclipse compiler, but I am not sure.

There is an example in attached  zip file:
if you run ajc1 - compilation will fail (because of indirect 
if you run compile and than ajc2 - everything works fine, because 
classes are created with javac and after that is ajc used  "in weaving" 


Is there a correct solution of this problem ?

I have one idea for you.
ajc does not accept class files as "sources"
In my opinion it would be useful to have a possibility to use class 
files instead of java, or aj files.
This feature gives possibility to use ajc as "pure" weaver. (Motivation 

is, that one can skip "weaving" of filtered classes during build 
Do you like this idea ?

p.s. Unfortunately I am not able to create better simulation  (I mean 
without external jar files) &
I hope that I am not doing a crime  (redistribution of IBM property :-) 

best regards

aspectj-dev mailing list


aspectj-dev mailing list