Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Not exposed to weaver and compilation errors
Not exposed to weaver and compilation errors [message #44232] Fri, 12 November 2004 09:40 Go to next message
Rory Steele is currently offline Rory SteeleFriend
Messages: 4
Registered: July 2009
Junior Member
Hello

I have two projects open in my workspace: a java project and an AJDT
project - the AJDT references the other in its Java build path (in
projects tab).
When I try to compile the AJDT, it gives a 'type not exposed to weaver'
warning when it tries to weave an object in the other java project.
However, when I add the bin folder of the java project to the AJDT inpath
as a class folder, the weave warning goes away but the java project
suddenly develops a load of compilation errors. Am I doing something wrong
here?

Normally I break my java projects up like this and they all play happily
together - it only seems to happen when I add it via the inpath

Cheers for any help

Rory
Re: Not exposed to weaver and compilation errors [message #44261 is a reply to message #44232] Fri, 12 November 2004 17:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mchapman.uk.ibm.com

On Fri, 12 Nov 2004 09:40:18 +0000, Rory Steele wrote:
> I have two projects open in my workspace: a java project and an AJDT
> project - the AJDT references the other in its Java build path (in
> projects tab).
> When I try to compile the AJDT, it gives a 'type not exposed to weaver'
> warning when it tries to weave an object in the other java project.
> However, when I add the bin folder of the java project to the AJDT inpath
> as a class folder, the weave warning goes away but the java project
> suddenly develops a load of compilation errors. Am I doing something wrong
> here?
>
> Normally I break my java projects up like this and they all play happily
> together - it only seems to happen when I add it via the inpath

Hi,

What you're doing sounds okay. You need to use inpath in order for the
classes from the Java project to be woven into.

There is an option under project properties > AspectJ > Output weaving
info messages to problem view. Enabling that will then confirm what is
being woven.

What sort of errors are you seeing in the Java project? Do other Java
projects with the same setup have the problem too, or it is just this one?
What versions of Eclipse and AJDT are you using?

Regards,

Matt.
Re: Not exposed to weaver and compilation errors [message #44290 is a reply to message #44261] Mon, 15 November 2004 09:48 Go to previous message
Rory Steele is currently offline Rory SteeleFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

> There is an option under project properties > AspectJ > Output weaving
> info messages to problem view. Enabling that will then confirm what is
> being woven.

With that enabled I get (potted history only):
Extending interface set for type
'org.cancerresearchuk.acl.spi.ISemanticObject' (ISemanticObject.class) to
include 'HasExpression' (HasExpression.java)

and

this affected type is not exposed to the weaver:
org.cancerresearchuk.acl.spi.ISemanticObject [Xlint:typeNotExposedToWeaver]

The class ISemanticObject is in the other (java) project.

> What sort of errors are you seeing in the Java project? Do other Java
> projects with the same setup have the problem too, or it is just this one?

When I add the bin folder of this project to the inpath I get the
following errors in the java (not AJDT) project:

can't find type com.hp.hpl.jena.ontology.* (where * is a seemingly random
selection of classes)
can't find type junit.framework.TestCase
etc.

The only thing in common seems to be that it can't find classes in
included jars of the java project that it normally can find ex jena.jar,
junit.jar. The java project is decorated with a red cross for errors but
none of the files within the project are - though you can find them by
checking the properties of the error message.

With that in mind, I just added the extra jars that were in the java
project to the AJDT project, and the errors go away. None of the files in
these jars would be needed for weaving, other than that the original java
source uses them. Does this seem like the correct behaviour? I can
understand needing the jars if I wanted to run the stuff in the AJDT
project but not the compilation errors in a project that was previously
compiling OK

> What versions of Eclipse and AJDT are you using?

Eclipse 3.0.1 200409161125
AJDT 1.2.0 20041013155315

> Regards,

> Matt.

Cheers
Rory
Re: Not exposed to weaver and compilation errors [message #584929 is a reply to message #44232] Fri, 12 November 2004 17:34 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
On Fri, 12 Nov 2004 09:40:18 +0000, Rory Steele wrote:
> I have two projects open in my workspace: a java project and an AJDT
> project - the AJDT references the other in its Java build path (in
> projects tab).
> When I try to compile the AJDT, it gives a 'type not exposed to weaver'
> warning when it tries to weave an object in the other java project.
> However, when I add the bin folder of the java project to the AJDT inpath
> as a class folder, the weave warning goes away but the java project
> suddenly develops a load of compilation errors. Am I doing something wrong
> here?
>
> Normally I break my java projects up like this and they all play happily
> together - it only seems to happen when I add it via the inpath

Hi,

What you're doing sounds okay. You need to use inpath in order for the
classes from the Java project to be woven into.

There is an option under project properties > AspectJ > Output weaving
info messages to problem view. Enabling that will then confirm what is
being woven.

What sort of errors are you seeing in the Java project? Do other Java
projects with the same setup have the problem too, or it is just this one?
What versions of Eclipse and AJDT are you using?

Regards,

Matt.
Re: Not exposed to weaver and compilation errors [message #584942 is a reply to message #44261] Mon, 15 November 2004 09:48 Go to previous message
Rory Steele is currently offline Rory SteeleFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

> There is an option under project properties > AspectJ > Output weaving
> info messages to problem view. Enabling that will then confirm what is
> being woven.

With that enabled I get (potted history only):
Extending interface set for type
'org.cancerresearchuk.acl.spi.ISemanticObject' (ISemanticObject.class) to
include 'HasExpression' (HasExpression.java)

and

this affected type is not exposed to the weaver:
org.cancerresearchuk.acl.spi.ISemanticObject [Xlint:typeNotExposedToWeaver]

The class ISemanticObject is in the other (java) project.

> What sort of errors are you seeing in the Java project? Do other Java
> projects with the same setup have the problem too, or it is just this one?

When I add the bin folder of this project to the inpath I get the
following errors in the java (not AJDT) project:

can't find type com.hp.hpl.jena.ontology.* (where * is a seemingly random
selection of classes)
can't find type junit.framework.TestCase
etc.

The only thing in common seems to be that it can't find classes in
included jars of the java project that it normally can find ex jena.jar,
junit.jar. The java project is decorated with a red cross for errors but
none of the files within the project are - though you can find them by
checking the properties of the error message.

With that in mind, I just added the extra jars that were in the java
project to the AJDT project, and the errors go away. None of the files in
these jars would be needed for weaving, other than that the original java
source uses them. Does this seem like the correct behaviour? I can
understand needing the jars if I wanted to run the stuff in the AJDT
project but not the compilation errors in a project that was previously
compiling OK

> What versions of Eclipse and AJDT are you using?

Eclipse 3.0.1 200409161125
AJDT 1.2.0 20041013155315

> Regards,

> Matt.

Cheers
Rory
Previous Topic:Not exposed to weaver and compilation errors
Next Topic:before() and after()
Goto Forum:
  


Current Time: Fri Jan 03 03:16:40 GMT 2025

Powered by FUDForum. Page generated in 0.03871 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top