Cannot find org.aspectj.weaver.reflect.ReflectionWorld

后端 未结 5 1844
暖寄归人
暖寄归人 2020-12-06 07:10

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

When I add the code <

相关标签:
5条回答
  • 2020-12-06 07:57

    Ok, I finally found the solution to my problem!

    When I installed the Spring Tools plugin it seems I forgot to check both "AspectJ Compiler" and "AspectJ Development Tools" from the plugin list. As soon as I installed and restarted the Eclipse, the errors disappeared.

    Here's a print screen if someone interested:

    enter image description here

    0 讨论(0)
  • 2020-12-06 08:00

    Here's what worked for me:

    • I added to my POM.xml the dependencies Pere suggested in his answer:

      org.aspectj aspectjrt 1.7.3
      org.aspectj aspectjweaver 1.7.3

    Then I right clicked on my project's name in Project Explorer --> properties --> java build path --> Order and Export tab.

    In this tab I noticed that for some strange reason Maven Dependencies is no longer checked. I checked it, and after I applied the changes, the error mentioned in the question above disappeared.

    0 讨论(0)
  • 2020-12-06 08:01

    I received this same error message when copying xml code from an older project. I believe the relevant line in the <beans header that was causing the problem was:
    http://www.springframework.org/schema/tx/spring-tx-3.2.xsd as the project had been/was actually using the 4.0 libraries.

    To fix it I deleted the offending xml file, used right click to remove spring project nature (under spring tools), closed/reopened the project. Once the error was gone, I converted back to spring nature and then recreated the xml file with 3.2 properly changed to 4.0.

    0 讨论(0)
  • 2020-12-06 08:09

    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>
    
    0 讨论(0)
  • 2020-12-06 08:10

    I had to add the Spring builder to my eclipse .project file to fix this issue

            <buildCommand>
            <name>org.springframework.ide.eclipse.core.springbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    
    0 讨论(0)
提交回复
热议问题