Many people generate artifacts when using myeclipse4.1.1 to generate a ing file for a table. I also encountered this problem, which made me very depressed!
After reading many posts, I still cannot solve the problem. Finally, the following error message is displayed by viewing the. metadata \. log file:
! 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: cocould 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.generateartifactsjob00005.exe cute (GenerateArtifactsJob. java: 405)
At org.hibernate.lele.execution.defaultexecutioncontext.exe cute (DefaultExecutionContext. java: 35)
At org.hibernate.lele.consoleconfiguration.exe cute (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.exe cSQL (Connection. java: 2048)
At com.mysql.jdbc.Connection.exe cSQL (Connection. java: 2005)
At com.mysql.jdbc.Statement.exe cuteQuery (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
It seems that the database driver is in trouble. My configuration is: Eclipse3.1.2 + MyEclipse4.1.1 + MySQL5.0.12. The database driver uses the latest mysql-connector-java-5.0.4-bin.jar. It's strange why such a problem still occurs.
Finally, try to set the configuration page schema datails of DB-browser during connection to dispaly all schema and then connect again. Then, the ing file can be generated for the table.
It seems strange.
I hope you can check the eclipse \ workspace \. metadata. metadata \. log File to solve this problem according to the error message.