acceso denegado para usuario en hibernate
Hola, al correr un programa que usa hibernate, y al tratar de realizar un alta, me sale el siguiente error:
.....
ERROR JDBCExceptionReporter:72 - Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
......
Cannot open connection
Està bien mi hibernate.properties?, dice:
## MySQL
hibernate.dialect org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql:///DataBases/ESCUELA
hibernate.connection.username cesar
hibernate.connection.password
- La lìnea de la connection url no me convence. Hay algún manual/tutorial o en castellano que explique bien la sintaxis del hibernate.properties?
-Aclaro que ESCUELA es una carpeta dentro del proyecto que tiene ESCUELA.SQL
Muchas gracias, desde ya
Màs en detalle el error dice:
16:16:10,218 WARN SettingsFactory:103 - Could not obtain connection metadata
java.sql.SQLException: Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1831)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2389)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:757)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1654)
at com.mysql.jdbc.Connection.<init>(Connection.java:432)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1869)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1162)
at escuela.abm.CategoriaABM.getSessionFactory(CategoriaABM.java:52)
at escuela.abm.CategoriaABM.getSession(CategoriaABM.java:63)
at escuela.abm.CategoriaABM.add(CategoriaABM.java:132)
at escuela.abm.CategoriaABM.main(CategoriaABM.java:342)
16:16:10,375 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Soft/hibernArti/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
16:16:10,968 WARN JDBCExceptionReporter:71 - SQL Error: 1045, SQLState: 28000
16:16:10,968 ERROR JDBCExceptionReporter:72 - Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
Error añadiendo categoría: Cannot open connection
.....
ERROR JDBCExceptionReporter:72 - Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
......
Cannot open connection
Està bien mi hibernate.properties?, dice:
## MySQL
hibernate.dialect org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql:///DataBases/ESCUELA
hibernate.connection.username cesar
hibernate.connection.password
- La lìnea de la connection url no me convence. Hay algún manual/tutorial o en castellano que explique bien la sintaxis del hibernate.properties?
-Aclaro que ESCUELA es una carpeta dentro del proyecto que tiene ESCUELA.SQL
Muchas gracias, desde ya
Màs en detalle el error dice:
16:16:10,218 WARN SettingsFactory:103 - Could not obtain connection metadata
java.sql.SQLException: Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1831)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2389)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:757)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1654)
at com.mysql.jdbc.Connection.<init>(Connection.java:432)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1869)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1162)
at escuela.abm.CategoriaABM.getSessionFactory(CategoriaABM.java:52)
at escuela.abm.CategoriaABM.getSession(CategoriaABM.java:63)
at escuela.abm.CategoriaABM.add(CategoriaABM.java:132)
at escuela.abm.CategoriaABM.main(CategoriaABM.java:342)
16:16:10,375 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Soft/hibernArti/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
16:16:10,968 WARN JDBCExceptionReporter:71 - SQL Error: 1045, SQLState: 28000
16:16:10,968 ERROR JDBCExceptionReporter:72 - Invalid authorization specification, message from server: "Access denied for user 'cesar'@'localhost' (using password: NO)"
Error añadiendo categoría: Cannot open connection