Reputation: 1362
I'm going through a Spring Roo tutorial and learning about adding fields to models. I started up my computer today and when I started the roo shell in my terminal it gave me this error:
Encountered " "void" "void "" at line 17, column 8.
Was expecting one of:
"class" ...
"enum" ...
"interface" ...
"@" ...
"@" ...
"@" ...
"@" ...
My only model is Course.java. It looks like this:
package matt.coursemanager.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;
@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class Course {
}
Line 17, column 8 is the 'c' in 'class' on the 'public class Course {' line.
If I try to add any fields to Course it throws the same error (and doesn't successfully add the field). I didn't change anything between roo sessions, this just happened when I opened the shell.
Upvotes: 1
Views: 490
Reputation: 1362
My problem was that I was running roo from the wrong directory. We use SVN for version control, and I was in the directory containing the trunk, instead of trunk.
Upvotes: 1
Reputation: 2842
There is a compilation error.
Maybe you typed something wrong while editing the fields.
Try to solve it and re-open the Roo shell.
The best option is to use an IDE, STS for instance. Import the project (as a general project if you executed "perform eclipse" or as a maven project otherwise)
Upvotes: 1