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

前端 未结 9 1444
遥遥无期
遥遥无期 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 19:14

    Either you experienced database connection issue or you missed any of the hibernate configurations to connect to database such as database DIALECT.

    Happens if your database server was disconnected due to network related issue.

    If you're using spring boot along with hibernate connected to Oracle Db, use

    hibernate.dialect=org.hibernate.dialect.HSQLDialect
    hibernate.show_sql=true
    hibernate.hbm2ddl.auto=update
    hibernate.generate_statistics=true
    entitymanager.packagesToScan: com
    
    0 讨论(0)
  • 2020-12-08 19:17

    Cause: The error occurred since hibernate is not able to connect to the database.
    Solution:
    1. Please ensure that you have a database present at the server referred to in the configuration file eg. "hibernatedb" in this case.
    2. Please see if the username and password for connecting to the db are correct.
    3. Check if relevant jars required for the connection are mapped to the project.

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

    You forget the @ID above the userId

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