I am trying to configure hibernate orm mapping tool to my java class and using PostgreSQL as my database and configured the password as "password". When I tried to
You don't need hibernate-entitymanager-xxx.jar
, because of you use a Hibernate session approach (not JPA
). You need to close the SessionFactory
too and rollback a transaction on errors. But, the problem, of course, is not with those.
This is returned by a database
#
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "sa"
#
Looks like you've provided an incorrect username or (and) password.
I am using Eclipse mars, Hibernate 5.2.1, Jdk7 and Oracle 11g.
I get the same error when I run Hibernate code generation tool. I guess it is a versions issue due to I have solved it through choosing Hibernate version (5.1 to 5.0) in the type frame in my Hibernate console configuration.
Upgrade MySql driver to Connector/Python 8.0.17 or greater than 8.0.17, Those who are using greater than MySQL 5.5 version
you must stop another running app involved with especial database table ... like running java API in other module or other project is not terminated .. so terminate running.
I had this error with MySQL as my database and the only solution was reinstall all components of MySQL, because before I installed just the server.
So try to download other versions of PostgreSQL and get all the components
I got the same error and changing the following
SessionFactory sessionFactory =
new Configuration().configure().buildSessionFactory();
to this
SessionFactory sessionFactory =
new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
worked for me.