很多人在用myeclipse4.1.1对一个表生成映射文件的时候,都出现“generating artifacts"的问题。我也遇到了这个问题,弄得我也很郁闷!
看了很多人的帖子后还是无法搞定。最后通过查看.metadata\.log文件发现出现如下错误提示:
!ENTRY org.eclipse.core.runtime 4 2 2006-11-06 17:08:56.78
!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
ito
libraryweb
mysql
schoolproject
test
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: Syntax error or access violation, message from server: "Unknown database 'default catalog'"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1098)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1192)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1153)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2048)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2005)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1156)
at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3342)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:70)
... 11 more
看来真是数据库驱动惹得祸。我的配置是:Eclipse3.1.2+MyEclipse4.1.1+MySQL5.0.12。数据库驱动用的是最新的mysql-connector-java-5.0.4-bin.jar。为什么还出现这样的问题,真是奇怪。
最后试着将DB-browser在连接时的配置页schema datails设置为dispaly all schema时然后再连接,结果就可以对表生成映射文件。
看
希望大家在遇到这个问题的时候,注意看一下eclipse\workspace\.metadata.metadata\.log文件,可以根据错误提示解决问题。
问题碰得多。。。会解决了,就是一种经验
分享到:
相关推荐
### Generating Artifacts问题解决知识点详解 #### 一、问题背景及概述 在使用MyEclipse进行Web开发过程中,特别是利用Hibernate框架进行数据库反向工程(Hibernate Reverse Engineering)时,可能会遇到名为...
描述中提到了具体的错误信息:"Problem Occurred Generating Artifacts",这个错误发生在2009年11月8日下午6:54:39(GMT+08:00),原因是"Could not get list of suggested identity strategies from database....
- **Model Transformation**: Transforms higher-level models into lower-level ones, eventually generating code or other artifacts. #### UML Scheme for AJAX UI Modeling To address the specific needs of ...
- **An internal error occurred during: "Generating Artifacts"**:这通常是由于MyEclipse的某些插件出现问题导致的,可以通过重启MyEclipse来尝试解决问题。如果问题依旧存在,可以尝试禁用不必要的插件或者升级...
Method and apparatus to reduce artifacts in a computed-tomography (CT) image by iterative reconstruction (IR) using a cost function with a de-emphasis operator Video emphasis encoding method and ...
| clean | Clean up build artifacts. | | all | Build all enabled targets (default target). | | Variables | Description | | --------------- | ----------- | | BUILD_UTILS | Build the `glewinfo` and `...
Q522716 - Automatic sizing enabled with EditAutoHeight produces painting artifacts in a cell whose vertical alignment does not match taTopJustify B233000 - Documentation - The TcxCustomGridTableView....
Q522716 - Automatic sizing enabled with EditAutoHeight produces painting artifacts in a cell whose vertical alignment does not match taTopJustify B233000 - Documentation - The TcxCustomGridTableView....
对于数字操作,书中讲解了如何对数字进行四舍五入(Rounding numbers)、生成随机数(Generating random numbers)、将字符串转换为整数和小数(Converting strings to integers and decimals)、以及将数字转换为...
Common components include compiling sources, creating object files, linking, and generating documentation. ##### BUILD_VARIANTS (Build Variants) This setting defines the build variants for the ...
“polygonization” artifacts often encountered on mesh silhouettes and interior contours. Phong Tessellation can be implemented on today’s GPU using either uniform or adaptive instanced tessellation ...
12.1.1 Generating a Web Dynpro User Interface 12.1.2 Post-Configuration Steps 12.2 Integrating SAPUI5 into an SAP BPM Process 12.2.1 SAPUI5 Technology Platform 12.2.2 Model-View-Controller Concept...
59. The DOM: Junk artifacts and nodeType(DOM:无用的元素和节点类型):识别和处理DOM中可能存在的无用元素和节点类型。 60. The DOM: More ways to target elements(DOM:更多选择元素的方法):介绍其他选择...