`
penghao122
  • 浏览: 363919 次
  • 性别: Icon_minigender_1
  • 来自: 广东珠海
社区版块
存档分类
最新评论

“generating artifacts"的解决!

阅读更多
很多人在用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问题解决.doc

    ### Generating Artifacts问题解决知识点详解 #### 一、问题背景及概述 在使用MyEclipse进行Web开发过程中,特别是利用Hibernate框架进行数据库反向工程(Hibernate Reverse Engineering)时,可能会遇到名为...

    错误:使用MyEclipse Database Exp

    描述中提到了具体的错误信息:"Problem Occurred Generating Artifacts",这个错误发生在2009年11月8日下午6:54:39(GMT+08:00),原因是"Could not get list of suggested identity strategies from database....

    Modelling and Generating Ajax Applications A Model-Driven Approach

    - **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 ...

    struts2+hibernate3.3+spring3.0配置

    - **An internal error occurred during: "Generating Artifacts"**:这通常是由于MyEclipse的某些插件出现问题导致的,可以通过重启MyEclipse来尝试解决问题。如果问题依旧存在,可以尝试禁用不必要的插件或者升级...

    De-Emphasis.rar

    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 ...

    glew-2.1.0.tgz

    | clean | Clean up build artifacts. | | all | Build all enabled targets (default target). | | Variables | Description | | --------------- | ----------- | | BUILD_UTILS | Build the `glewinfo` and `...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part2

    Q522716 - Automatic sizing enabled with EditAutoHeight produces painting artifacts in a cell whose vertical alignment does not match taTopJustify B233000 - Documentation - The TcxCustomGridTableView....

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part1

    Q522716 - Automatic sizing enabled with EditAutoHeight produces painting artifacts in a cell whose vertical alignment does not match taTopJustify B233000 - Documentation - The TcxCustomGridTableView....

    A Smarter Way to Learn JavaScript.pdf

    对于数字操作,书中讲解了如何对数字进行四舍五入(Rounding numbers)、生成随机数(Generating random numbers)、将字符串转换为整数和小数(Converting strings to integers and decimals)、以及将数字转换为...

    Xcode_Build_Setting_Reference

    Common components include compiling sources, creating object files, linking, and generating documentation. ##### BUILD_VARIANTS (Build Variants) This setting defines the build variants for the ...

    GPU Pro 360 Guide to Geometry Manipulation pdf2018

    “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 ...

    SAP PO/PI教程 Process Orchestration The Comprehensive Guide

    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...

    A samart way to learn javascript

    59. The DOM: Junk artifacts and nodeType(DOM:无用的元素和节点类型):识别和处理DOM中可能存在的无用元素和节点类型。 60. The DOM: More ways to target elements(DOM:更多选择元素的方法):介绍其他选择...

Global site tag (gtag.js) - Google Analytics