Skip to content
Advertisement

How to resolve “Caused by: org.postgresql.util.PSQLException: ERROR: relation “employee” does not exist Position: 13″ error?

I have tried to execute the Hibernate Demo application. I’m getting the below error message.

Database: PostgreSQL Hibernate Version: 5

Source code for Bean class package com.javatpoint;

JavaScript

Test class package com.javatpoint;

JavaScript

hibernate.cfg.xml

JavaScript

Error Message

JavaScript

Eclipse Project

PostgreSQL Database

Advertisement

Answer

Hibernate is trying to create entity in hibernatedemo schema. You need to create that schema in database. I did not see your configuration that is pointing to hibernatedemo schema. The cfg.xml is generated by MyEclipse Hibernate tools. Check that configuratioon.

How to create schema in PostGreSQL Link

JavaScript

After creating schema try again to start your application

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement