亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法確定以下列的類型:TIMESTAMP,位于表:

無法確定以下列的類型:TIMESTAMP,位于表:

寶慕林4294392 2022-09-07 21:12:39
Exception in thread "main" org.hibernate.MappingException: Could not determine type for: TIMESTAMP, at table: BATCH_JOB_CONFIG_DTLS, for columns: [org.hibernate.mapping.Column(ADD_USER_DTM)]    at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:486)    at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:453)    at org.hibernate.mapping.Property.isValid(Property.java:226)    at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:624)    at org.hibernate.mapping.RootClass.validate(RootClass.java:267)    at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:347)    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:466)    at com.hms.api.batch.job.config.StartBatchJobConfigApplication.createSession(StartBatchJobConfigApplication.java:71)    at com.hms.api.batch.job.config.StartBatchJobConfigApplication.main(StartBatchJobConfigApplication.java:38)以下是我的代碼。在 Main 中調用 createSession() 方法。我有兩個實體類。數據庫連接在我的休眠狀態中提供.cfg.xmlprivate static void createSession() {        StandardServiceRegistry ssr = new StandardServiceRegistryBuilder().configure("hibernate.cfg.xml").build();        Metadata meta = new MetadataSources(ssr).getMetadataBuilder().build();        SessionFactory factory = meta.getSessionFactoryBuilder().build();        Session session = factory.openSession();        Transaction t = session.beginTransaction();        SessionFactory fact = meta.getSessionFactoryBuilder().build();        Session ss = factory.openSession();        Transaction tt = session.beginTransaction();        } 
查看完整描述

1 回答

?
慕田峪4524236

TA貢獻1875條經驗 獲得超5個贊

將所有小寫字母“時間戳”而不是大寫字母放在 hbm.xml 文件中。像這樣:

<property name="addUserDtm" column="ADD_USER_DTM" type="timestamp" />


查看完整回答
反對 回復 2022-09-07
  • 1 回答
  • 0 關注
  • 101 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號