用ecplise中的myeclise的DB Browser 中建立sql server数据库的连接,之后点表生成create hibernate maping的时候,出现
an internal error occurred during : "Generating Artifacts "
我是用数据源连接的。
如何解决,请大家帮忙看看
我的.log文件的内容:
!ENTRY org.eclipse.core.jobs 4 2 2007-07-08 09:07:38.796
!MESSAGE An internal error occurred during: "Generating Artifacts ".
!STACK 0
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:dbo
Configured catalog:jiudian
<SQLException while getting schemas>
<SQLException while getting catalogs>
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.handleSQLException(JDBCMetaDataDialect.java:86)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:50)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:400)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:65)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:104)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:87)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:137)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$6.execute(GenerateArtifactsJob.java:529)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:524)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:296)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5699)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:353)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:410)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.putTablePart(JDBCMetaDataDialect.java:203)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.access$000(JDBCMetaDataDialect.java:25)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:77)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
... 11 more
------解决方法--------------------------------------------------------
应该是你SQL的连接语句写错了,要么就是三个SQL 的JAR包没引用
------解决方法--------------------------------------------------------
你的问题有没有搞定啊, 我也有同样的问题. 我用MYecplise 5.5 . 不过连接的是Oracle8
------解决方法--------------------------------------------------------
看看是不是你驱动程序太老了,我有一次用ORACLE10g时也碰到这个问题,后面把驱动程序改成JODBC14.JAR就可以了,所以试试换新版的驱动程序.