To use the simplified page activation context for a hibernate entity
page (e.g., onActivate(Person p)...), it looks like the entity class'
primary key id field's name must match VERBATIM the text that follows
the word "get" in the getter (and "set" in the setter, probably).

I.e., this won't work:

@Id @GeneratedValue
private Long _id;

public Long getId()....

This fails because getId is not named get_id.  I normally use
underscore prefixes for my instance variables.  This is failing in
HibernateEntityValueEncoder on this line:

propertyAdapter =
propertyAccess.getAdapter(this.entityClass).getPropertyAdapter(idPropertyName);

It looks for an idPropertyName "_id" and doesn't find one because
according to the getter/setter pattern, the name is "id".  The
propertyAdapter is then null which throws an NPE on line 79:

Object id = typeCoercer.coerce(clientValue, propertyAdapter.getType());

Bill in Austin

-- 
Without coding you have no product
Without testing, no quality
Without refactoring, no future

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to