Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

前端 未结 9 1443
遥遥无期
遥遥无期 2020-12-08 18:30

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

相关标签:
9条回答
  • 2020-12-08 18:56

    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.

    0 讨论(0)
  • 2020-12-08 19:07

    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.

    0 讨论(0)
  • 2020-12-08 19:08

    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

    0 讨论(0)
  • 2020-12-08 19:08

    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.

    0 讨论(0)
  • 2020-12-08 19:10

    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

    0 讨论(0)
  • 2020-12-08 19:12

    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.

    0 讨论(0)
提交回复
热议问题