struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kropp, Henning" <>
Subject Hibernate UserType and OGNL
Date Thu, 14 Aug 2008 12:16:07 GMT

I am trying to implement a hibernate UserType for all the monetary 
amounts in my application. I follow the example given in "Manning - Java 
Persistence with Hibernate" Chapter 5.3 .
I am having difficulties to set and retrieve the value from a jsp due to 
a lack of understanding how this is handled. I assume it is related to OGNL.

Basically I am trying the following:
<s:textfield key="bid.amount" /> ( also tried: <s:textfield 
key="bid.amount.amount" /> )

@org.hibernate.annotations.Type ( type= 
"" )
@Column( name="amount" )
public Monetary getAmount() { return amount; }

and Monetary beeing:
public class Monetary implements Serializable{
    private final BigDecimal amount;
    private final Currency currency;

    public Monetary(BigDecimal amount, Currency currency) {
        this.amount = amount;
        this.currency = currency;

    public BigDecimal getAmount() { return amount; }
    public Currency getCurrency() { return currency; }

I am getting either a field error or with "bid.amount.amount" :
ERROR [btpool0-2] InstantiatingNullHandler.nullPropertyValue(110) | 
Could not create and/or set value back on to object

What am I doing wrong? What is this 
InstantiatingNullHandler.nullPropertyValue and how to trac it down?

Thanks and kind regards

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message