I refactored Appfuse Struts basic so I have a the following
BaseObject (contains equals, hashcode and toString)
BaseEntity (contains id, version, status(i.e. active/inactive/etc) and
AuditInfo fields) inherits from BaseObject
My embedded objects just inherit from BaseObject.
My entity objects inherit from BaseEntity.
All appeared to be working, but now I'm getting the following error:
[INFO] Starting scanner at interval of 3 seconds.
2008-03-02 20:07:51.000::WARN: Nested in javax.servlet.ServletException:
java.lang.NoSuchMethodError:
org.appfuse.model.User.getVersion()Ljava/lang/Integer;:
java.lang.NoSuchMethodError:
org.appfuse.model.User.getVersion()Ljava/lang/Integer;
at org.appfuse.webapp.action.UserAction.save(UserAction.java:161)
Here's an abbreviated version of BaseEntity:
@MappedSuperclass
public abstract class BaseEntity extends BaseObject implements Auditable {
private Long id;
private Integer version;
private Status status;
public AuditInfo auditInfo = new AuditInfo();
@Id @GeneratedValue(strategy=GenerationType.AUTO)
public Long getId() {
return id;
}
@Version
public Integer getVersion() {
return version;
}
@ManyToOne
public Status getStatus() {
return this.status;
}
@Embedded
public AuditInfo getAuditInfo() {
return auditInfo;
}
and then User:
@Entity
@Table(name="user")
@Inheritance(strategy=InheritanceType.JOINED)
public class User extends BaseEntity implements Serializable, UserDetails {
private String username; // required
private String password; // required
private String confirmPassword;
private String passwordHint;
private String firstName; // required
private String middleName;
private String lastName; // required
private String email; // required; unique
private String phoneNumber;
private String website;
private Address address = new Address();
private Set<Role> roles = new HashSet<Role>();
private boolean enabled;
private boolean accountExpired;
private boolean accountLocked;
private boolean credentialsExpired;
...
Obviously (or not ??) getInteger has a return signature of Integer. I don't
get it.
What am I missing. I did the following to get this result:
mvn hibernate3:hbm2ddl
mvn dbunit:operation
mvn
mvn jetty:run
Then logged in via the UI and attempted to edit the user profile.
Thanks in advance!
--
View this message in context:
http://www.nabble.com/UserAction.save-cannot-see-User.getVersion%28%29-tp15797151s2369p15797151.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]