Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
99 views
in Technique[技术] by (71.8m points)

java - Cannot find org.aspectj.weaver.reflect.ReflectionWorld

I'm setting a Spring 3.2.3 + Hibernate 4 project in Eclipse 4.3.

When I add the code <tx:annotation-driven transaction-manager="transactionManager"/> to my context I start getting the following error in every single bean:

Build path is incomplete. Cannot find class file for org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

Now, I added both AspectJ Tools and Cglib dependencies to my project and the JARs are there, including the class it can't find. The application runs normally, and Spring is managing sessions and transactions successfully.

I've searched for a solution but every answers says the error occurs because the lack of JARs.

Does anyone knows what I'm missing (incompatible versions?) or is this an Eclipse bug?

Here is a print screen of the problem (every error you'll see is the one I indicated above).

enter image description here

Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Maybe you're missing som aspectj libs?

Try adding to your pom

<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.7.3</version>    
</dependency>
<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjweaver</artifactId>
    <version>1.7.3</version>
</dependency>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...