Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] binary weaving not working on some class files

Hi,
I have been using binary weaving (ajc with -inpath and -aspectpath)
for some projects, but sometimes ajc does not weave the aspects for
some class files.

To be more specific, I'm trying to add an interface to all user defined classes:

public aspect AddInterface {
  declare parents: !java..* && !edu.unm.cs.oal.sharing.* &&
!org.aspectj..* implements Subject;
}

When I try to binary-weave this aspect with
 # ajc -XnotReweavable -inpath in/ -aspectpath aspect/ -d out/
I get the following errors:

---SNIP---
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.Task
when processing declare parents net.sourceforge.pmd.cpd.CPDTask
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.Task
when processing declare parents net.sourceforge.pmd.cpd.CPDTask
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.types.EnumeratedAttribute
when processing declare parents net.sourceforge.pmd.cpd.CPDTask$FormatAttribute
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.types.EnumeratedAttribute
when processing declare parents net.sourceforge.pmd.cpd.CPDTask$FormatAttribute
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.Task
when processing declare parents net.sourceforge.pmd.ant.PMDTask
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.Task
when processing declare parents net.sourceforge.pmd.ant.PMDTask
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.types.EnumeratedAttribute
when processing declare parents
net.sourceforge.pmd.cpd.CPDTask$LanguageAttribute
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
/nfs/home/home1/dmohr/svn/alg-opt/trunk/david/sharing/bw-bug/in/net/sourceforge/pmd/dfa/pathfinder/PathElement.class
[error] can't determine implemented interfaces of missing type
org.apache.tools.ant.types.EnumeratedAttribute
when processing declare parents
net.sourceforge.pmd.cpd.CPDTask$LanguageAttribute
when processing type mungers
when weaving
when batch building BuildConfig[null] #Files=0
 [Xlint:cantFindType]
(no source information available)
	[Xlint:cantFindType]
---SNAP---

So in 1.6.2, net/sourceforge/pmd/dfa/pathfinder/PathElement.class is
not even copied over to the output folder, while in 1.6.1 it was
correctly woven (I did specify -Xnot

Yet there are classes not mentioned in any of these error messages,
where the aspect does not get woven! That class does get copied into
the output folder on all aspectj versions which I tried.

Should I post the -showWeaveInfo log, or rather upload the files somewhere?

Thanks for any help!

~David


Back to the top