Tune method in Controller. [PersistenceUnit: default] Unable to build Hibernate SessionFactory

不羁岁月 提交于 2019-12-04 22:28:03

Schema-validation: wrong column type encountered in column [id_bc] in table [banner]; found [int (Types#INTEGER)], but expecting [bigint (Types#BIGINT)]

This is the problem which is causing this

Stack trace it is mention that hibernate is validating your schema where it is finding wrong column type, this happen when hibernate.hbm2ddl.auto = validate ,

Now you can keep this property hibernate.hbm2ddl.auto = update , so that it will update the changes made in your entities,

or just change your database schema and make the type of this column as big integer, as in your entities you are using long.

Also, no need to recreate database when you are using hibernate.hbm2ddl.auto = update hibernate won't validate your schema in this case.

Thanks.

Remade database, changed in hibernate.hbm2ddl.auto = create

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!