- This topic has 2 replies, 2 voices, and was last updated 17 years, 12 months ago by kermtfrg.
-
AuthorPosts
-
kermtfrgMemberI am trying to reverse-engineer a table in an MS Access database but get the following error in the log
!ENTRY org.eclipse.core.jobs 4 2 2007-01-15 12:54:12.662 !MESSAGE An internal error occurred during: "Generating Artifacts". !STACK 0 org.hibernate.exception.GenericJDBCException: Error while reading primary key meta data for C:\dev\Budget\FY07 Budget.Product 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.getPrimaryKeys(JDBCMetaDataDialect.java:257) at org.hibernate.cfg.reveng.JDBCReader.processPrimaryKey(JDBCReader.java:281) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:71) 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 Driver Manager] Driver does not support this function at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLPrimaryKeys(Unknown Source) at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getPrimaryKeys(Unknown Source) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getPrimaryKeys(JDBCMetaDataDialect.java:239) ... 11 more
I’m using MyEclipse 5.1.0.
Thanks,
Jon
Riyad KallaMemberJon,
For reverse engineering and proper DB functionality you need a fully featured and relatively bug free JDBC driver. Unfortunately the ODBC-JDBC driver that is used for accessing Access does not fall into this category. There are a lot of features not implemented in the driver that our software needs from the JDBC spec. In this particular case, from the exception you can see the mapping process was unable to determine the PK for the table because the driver doesn’t support the feature.Using access is unfortunately a non-starter for most Java applications (just poor DB). I would suggest looking at MySQL for a full fledged driver or Apache Derby or HSQL if you want to use an embedded DB that is easier to get started with.
kermtfrgMemberThanks for the quick reply. I’m using MS Access as a prototype and eventually moving it to DB2. I’ll look for other solutions.
Jon
-
AuthorPosts