Dreamer
Dreamer

Reputation: 7551

No AspectJ getter/setter -- upgrade Roo from 1.1.5 to 1.2.1

I am upgrading current project from Roo 1.1.5 to 1.2.1.

I have noticed there are some new features in Roo 1.2.1 to facilitate JPA functionality, i.e. @RooEntity to @RooJpaActiveRecord, but I thought when I open Roo shell in STS it could handler that conversion automatically...I can still achieve that manually, however, after I change the annotation name, no matter I use poll now or re-build the project, all the getter/setter/finder/entityManager are error out due to no AspectJ injection, actually I can see the aspectJ files are generated, STS just cannot identify them with the entity java file. So suddenly the whole project falls apart.

Please, geniuses on the stack, let me know how to fix that. Many thanks in advance.

Upvotes: 0

Views: 945

Answers (2)

Dreamer
Dreamer

Reputation: 7551

I have figured out the solution:

Simply speaking: make sure running the project as a Maven project.

How: Right click project->Configure->Convert to Maven Project. Then run Right click project -> Maven -> Update Project Configuration.

Maven will build the project once again with aspect injection. I think the problem is previously my project is compiled under Spring Tools -> Update Maven Dependencies where if the STS/AspectJ Tool stop working, then the project will suffer from missing aspect injection(still thinking it is could be a remaining bug of STS, this issue may be very specific but still STS fail the job).

Sorry I have to answer my own question

Upvotes: 1

Adam Gent
Adam Gent

Reputation: 49085

Make sure you clean your project eclipse style. That is run Project->Clean.

Upvotes: 0

Related Questions