休止状態を使用しています..私は現在技術を学んでいます..どこが間違っているのかわかりません...これに関するPlsガイド..
タイプ TIMESTAMP() の db から Pojo 変数に列をマップしようとすると、上記のエラーが表示されます... 変数のタイプを Date...Calendar...Timestamp. に変更しようとしました。問題は列のマッピングにあるようです...これに関するヘルプは大歓迎です...
私のポジョクラス:
public class Pojo_****
{ .........
private Date C_TimeStamp;
private Date L_TimeStamp;
}
私のDBテーブル:
Table_****
..........
C_TimeStamp TIMESTAMP(6)
L_TimeStamp TIMESTAMP(6)
私の構成xml:
Pojo_****.hbm.xml
......
<property name="C_TimeStamp" column="C_TimeStamp" />
<property name="L_TimeStamp" column="L_TimeStamp" />
エラーログ:
In Main method of MainApp...
Mar 9, 2016 2:48:14 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2 cr4
Mar 9, 2016 2:48:14 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Mar 9, 2016 2:48:14 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Mar 9, 2016 2:48:14 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Mar 9, 2016 2:48:15 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: hibernate.cfg.xml
Mar 9, 2016 2:48:15 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: hibernate.cfg.xml
Mar 9, 2016 2:48:15 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: Pojo_****.hbm.xml
Mar 9, 2016 2:48:15 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: Pojo_****-> Table_****
Mar 9, 2016 2:48:15 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Failed to create sessionFactory object.org.hibernate.MappingException: Could not determine type for: Timestamp, for columns: [org.hibernate.mapping.Column(L_TimeStamp)]
Exception in thread "main" java.lang.ExceptionInInitializerError
at tutorialspoint.example.MainApp.main(MainApp.java:29)
Caused by: org.hibernate.MappingException: Could not determine type for: Timestamp, for columns: [org.hibernate.mapping.Column(L_TimeStamp)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:410)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1026)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at tutorialspoint.example.MainApp.main(MainApp.java:21)