myeclipse 链接mysql 生成pojo类

myeclipse已链接数据库,可看到数据库中的表以及修改数据,但生成pojo类时出现如下错误
An internal error occurred during: "Generating Artifacts".
Getting database metadata

2015-05-20 17:31:25,743 WARN Worker-34 org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3647)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2544)
at com.mysql.jdbc.Connection.(Connection.java:1474)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:40)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:72)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$7.execute(GenerateArtifactsJob.java:891)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:872)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:412)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

新人求助这是什么问题

2个回答

这个错误是无法获得连接元数据 你看看是不是你的数据库配置错误了?

qq_18576103
qq_18576103 不懂,可是我可以在myeclipse里面查看和修改数据库的设置的呀
5 年多之前 回复

这个错误是无法获得连接元数据 你看看是不是你的数据库配置错误了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐