How to get rid of 'java.lang.IllegalArgumentException: Unknown entity' while running a simple hibernate app?

前端 未结 3 1162
天命终不由人
天命终不由人 2021-01-04 18:48

I am new to Hibernate. While creating a small app using it I got following exception:

Exception in thread \"main\" java.lang.IllegalArgumentException: Unknown entit

3条回答
  •  醉话见心
    2021-01-04 19:23

    How do you map your entities to the db tables? You can try using @Table(name="???") annotation with @Entity for this purpose, while ??? indicates the table name in the database for this entity.

提交回复
热议问题