jpprade
jpprade

Reputation: 3664

Spring roo project doesn't compile in eclipse

I have to maintain a spring roo project so I imported it in eclipse, I can build it, if I run roo command "perform eclipse" it works.

The problem is that eclipse show compilation errors like :

The method entityManager() is undefined for the type MyType

or when trying to get model property :

mytype.getName();

The method getName() is undefined for the type MyType

I can see in the file MyType_Roo_JavaBean.aj that the method exits :

privileged aspect MyType_Roo_JavaBean {
...
 public String MyType.getName() {
        return this.name;
    }
...
}

I am using eclipse Juno + roo 1.2.2 + Spring framework 3.1.0 + m2e plugin + STS plugin (nightly build). I installed STS pluging hoping, it would help, but there is the same error with or without it.

Do you have an idea of what can be wrong ?

thanks !

Upvotes: 0

Views: 2153

Answers (3)

Ralph
Ralph

Reputation: 120771

Try to use the complete STS Version 2.9.x instead of a self assembled eclipse, because it looks like your eclipse is missing AspectJ. If you use the complete STS (Not only the spring plugin) you should have everything you need.

Another hint is to run in eclipse: project / maven / “Update project configuration"

Upvotes: 1

chora
chora

Reputation: 25

I am using Spring Tool Suite 3.4.0.RELEASE, and ran into a problem similar to this.

Problem: There are numerous warnings and errors occurring through out my class.

Solution: Double check that you don't have any malformed methods anywhere in the class. Anything appears to cause this. Some possible causes could be missing (1) semi-colon (2) closing brackets, and/or (3) closing braces. In my case, I had made some changes to an Enum being used, and I forgot to check where it was being used. Once you get that cleaned up, you should be fine (or, at least I was).

Upvotes: 1

Amarjeet Singh
Amarjeet Singh

Reputation: 1

What you need is an AJDT Configurator which also needs AJDT to be installed first.

So, if you don't have AJDT installed in your eclipse (Juno).. first install it from :

http://download.eclipse.org/tools/ajdt/42/update

Then, you need to install AJDT Configuarator from :

http://dist.springsource.org/release/AJDT/configurator/

Well, this thing worked for me, with the same configuration. Lemme know, if this helps you..

Upvotes: 0

Related Questions