java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss
<2012-08-09 11:51:43,546> DEBUG (HibernateTemplate.java:410) [http-8095-1] (org.rd.framework.hibernate.DefaultHibernateTemplate) - Found thread-bound Session for HibernateTemplate
Hibernate: select viewdevice0_.index_field as index1_226_, viewdevice0_.equipment_no as equipment2_226_, viewdevice0_.asset_category as asset3_226_, viewdevice0_.equipment_name as equipment4_226_, viewdevice0_.equipment_state as equipment5_226_, viewdevice0_.model
as model226_, viewdevice0_.register_person as register7_226_, viewdevice0_.register_date as register8_226_, viewdevice0_.use_dept as use9_226_, viewdevice0_.use_person as use10_226_, viewdevice0_.use_person_no as use11_226_, viewdevice0_.manage_dept as manage12_226_,
viewdevice0_.manage_person as manage13_226_, viewdevice0_.fact_scrapped_date as fact14_226_, viewdevice0_.should_scraped_date as should15_226_, viewdevice0_.finance_recorded_date as finance16_226_, viewdevice0_.original_value as original17_226_, viewdevice0_.supplier
as supplier226_, viewdevice0_.make_business as make19_226_, viewdevice0_.serial_no as serial20_226_, viewdevice0_.warranty_start_date as warranty21_226_, viewdevice0_.warranty_end_date as warranty22_226_, viewdevice0_.use_date as use23_226_ from view_device
viewdevice0_
<2012-08-09 11:51:44,171> ERROR (JDBCExceptionReporter.java:78) [http-8095-1] (org.hibernate.util.JDBCExceptionReporter) - An SQLException was provoked by the following failure: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
<2012-08-09 11:51:44,812> DEBUG (HibernateTemplate.java:435) [http-8095-1] (org.rd.framework.hibernate.DefaultHibernateTemplate) - Not closing pre-bound Hibernate Session after HibernateTemplate
原因:
manage_person是varchar2類型,我錯誤的配成了Date類型,就報這個錯誤
<key-property name="manage_person" type="java.util.Date">
<column name="manage_person" />
</key-property>
改成
<key-property name="manage_person" type="java.lang.String">
<column name="manage_person" />
</key-property>