为了账号安全,请及时绑定邮箱和手机立即绑定

Hibernate - 映射:无法确定 # 的类型,在表:#,对于列:#

Hibernate - 映射:无法确定 # 的类型,在表:#,对于列:#

小唯快跑啊 2021-09-03 17:16:34
我尝试了一切,但我被卡住了。你能帮我吗?小项目只是对大数据库的初步测试。我只使用了一个星期的 Hibernate,稍后我试图将它与 Srping MVC Tomcat 连接起来。但现在我只想能够识别映射中的错误。安慰:    `Initial SessionFactory creation failed.org.hibernate.MappingException: Could not determine type for: hiber.data_examplecompany.Address, at table: EMPLOYEE, for columns: [org.hibernate.mapping.Column(address)]Exception in thread "main" java.lang.ExceptionInInitializerError    at tools.hiber.HiberUtil.<clinit>(HiberUtil.java:19)    at tools.hiber.HiberSave.main(HiberSave.java:15)Caused by: org.hibernate.MappingException: Could not determine type for: hiber.data_examplecompany.Address, at table: EMPLOYEE, for columns: [org.hibernate.mapping.Column(address)]    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 org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:708)    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)    at tools.hiber.HiberUtil.<clinit>(HiberUtil.java:15)    ... 1 more员工.java:package hiber.data_examplecompany;import javax.persistence.Access;import javax.persistence.AccessType;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.OneToOne;import javax.persistence.Table;import org.hibernate.annotations.Cascade;@Entity@Table(name = "EMPLOYEE")@Access(value=AccessType.FIELD)
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 119 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信