Mar 1, 2011

javax.servlet.ServletException: BeanUtils.populate

troubleshooting

error log in browser
javax.servlet.ServletException: BeanUtils.populate

possible solution

in dao class, if the data member is of self-defined class, test for null in its get method and assign a new object to it.
for example
class Dao extends VersionDAO {
    private String str;
    private DateInput sampleDate = new DateInput();
    public String getStr() {
        return str;
    }
    public void setStr(String str) {
        this.str = str;
    }
    public DateInput getSampleDate() {
        if (sampleDate == null)
            sampleDate = new DateInput();
        return sampleDate;
    }
    public void setSampleDate(DateInput sampleDate) {
        this.sampleDate = sampleDate;
    }
}

comments
may have other causes if this is not the case

Dec 7, 2010

candy - love falling in love

今日聽收音機嘅時候鄧萃雯點咗呢首歌
聽返真係幾正
其實我仲有好多舊 mv 收藏架

Nov 30, 2010

departure delayed

第一次遇到飛機延誤,這一次至少延遲了十一個小時。現在已經是晚上十一點多了,我想這一次登機應該可以真正的飛走吧。

事緣北京那邊昨天晚上開始受大雷雨的影響,首都機場給關閉了整個晚上,來往都不能通。我們的航班本來應該在今早十一點鐘起飛了,結果來到的時候就要延遲到十二點半,於是我們改值了另一班機。好不容易才等到登機的時間,於是就登上機艙來,怎知道坐了好久原來用意是給乘客送上午餐,吃過了午飯馬上就要回到候機大堂⋯

(drafted on the first day of grad. trip stranded at shenzhen airport. suspended when it's about to take off
it was Jun 17, 2010)

half year

半年

我跟自己說:
個人囉囉攣想搵啲嘢搞吓,非改變現狀不可,唔搞會好 depressed,代表自己嗰一刻太得閒 both physically and mentally
一時諗多咗,瞓醒第二日返工又忙返就會冇事

to my 5530

其實呢部機有個虛擬鍵盤真係唔錯,但係就成日打錯字,仲要打錯咗自己都唔知,呢樣夠唔爽啦。我唔係話你唔好,畢竟你都陪咗我咁耐,冇你生活唔知點過,我好感激你架,不過天下無不散之筵席,你宜家有價有市,何不趁自己仲有價值嘅時候繼續開拓屬於你嘅路呢?或者有更適合你嘅命運等緊你,我哋就此暫別啦!