Aê galera, estou iniciando agora o estudo sobre hibernate e esta acontecendo o seguinte problema quando rodo a aplicação:
log4j:WARN No such property [conversionPattern] in org.apache.log4j.ConsoleAppender.
Hibernate Annotations 3.5.0-Final
Hibernate 3.5.0-Final
loaded properties from resource hibernate.properties: {hibernate.connection.password=<strong><strong>, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.show_sql=true, hibernate.connection.url=jdbc:mysql://localhost/empresa, hibernate.bytecode.use_reflection_optimizer=false, hibernate.coonection.username=root, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.format_sql=true}
Bytecode provider name : javassist
using JDK 1.4 java.sql.Timestamp handling
Hibernate Commons Annotations 3.2.0.Final
Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
Binding entity from annotated class: br.com.caelum.hibernate.Produto
Bind entity br.com.caelum.hibernate.Produto on table Produto
Hibernate Validator not found: ignoring
Running hbm2ddl schema export
exporting generated schema to database
Using Hibernate built-in connection pool (not for production use!)
Hibernate connection pool size: 20
autocommit mode: false
using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/empresa
connection properties: {password=</strong></strong>}
schema export unsuccessful
java.sql.SQLException: Access denied for user ‘’@‘localhost’ (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
at com.mysql.jdbc.Connection.(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:52)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:211)
at br.com.caelum.hibernate.GerarTabelas.main(GerarTabelas.java:14)
Esse é o meu hibernate.properties:
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/empresa
hibernate.coonection.username = root
hibernate.connection.password = 101010
hibernate.show_sql = true
hibernate.format_sql = true
Por favor se alguém já passou por isso ou se não passou por essa situação mas sabe como resolver e puder disponibilizar a solução do problema, agradeço muito.
Desde já Obrigado