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 中調(diào)用 createSession() 方法。我有兩個(gè)實(shí)體類。數(shù)據(jù)庫(kù)連接在我的休眠狀態(tài)中提供.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(); }
無(wú)法確定以下列的類型:TIMESTAMP,位于表:
寶慕林4294392
2022-09-07 21:12:39