解决myclispse4.1.1生成MAPPING 映射文件时,出现"Generating Artifacts"错误!

!ENTRY org.eclipse.core.runtime 4 2 2007-11-27 11:57:35.657
!MESSAGE An internal error occurred during: "Generating Artifacts".
!STACK 0
org.hibernate.exception.SQLGrammarException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:null
Configured catalog:Default Catalog
Available schemas:
Available catalogs:
  information_schema
  bbscs7
  mysql
  test
  wyong

 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
 at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:94)
 at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:395)
 at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:65)
 at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:102)
 at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:87)
 at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:129)
 at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$5.execute(GenerateArtifactsJob.java:405)
 at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
 at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
 at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:400)
 at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:266)
 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: java.sql.SQLException: Unknown database 'default catalog'
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
 at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
 at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
 at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
 at com.mysql.jdbc.DatabaseMetaData$9.forEach(DatabaseMetaData.java:4453)
 at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaData.java:79)
 at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:4440)
 at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:70)
 ... 11 more
 看到这个,首先想到是 不是数据库联接有问题,重新换了个,测试 还是不行,郁闷了半天,在网上搜到了一篇跟我情况出现一样的文章.看到他的解决方法,原来是在DB-BROWER联接数据库的时候 schema datails没有设置为dispaly all schema.

怎么着也不行,看到他的文章,才知道改成 DISPLAY ALL SCHEMA后,就可以了!

大家如果遇到这类问题,应该有解决方法了吧!^-^

你可能感兴趣的:(java,eclipse,mysql,Hibernate,jdbc)