max wrote:
you need to show the full staktrace its availble in the Error log view
First of all - you should know that I am using eclipse.buildId=I20050401-1645
Back to the problem with JDBC-ODBC connections to Access. The reason I turned to a native Access driver was because I was seeing the following error message:
http://ourworld.cs.com/cyranoVR/hiberna ... ataErr.JPG
Stacktrace:
Code:
org.hibernate.exception.JDBCConnectionException: Getting database metadata
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:66)
at org.hibernate.cfg.JDBCBinder.getMetaData(JDBCBinder.java:678)
at org.hibernate.cfg.JDBCBinder.readTables(JDBCBinder.java:566)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:101)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.JDBCBinder.getConnnection(JDBCBinder.java:691)
at org.hibernate.cfg.JDBCBinder.getMetaData(JDBCBinder.java:676)
So there's that. Back to the native Microsoft Access driver...
I easily resolved the "Problem Loading Class acs.jdbc.Driver" issue by importing the distribution Jar file into my project under /lib and then updating my hibernate console configuration accordlingly. Here is a screen capture:
http://ourworld.cs.com/cyranoVR/hibernateConfig.JPGSo no more "Problems loading Driverclass(acs.jdbc.Driver)" - it was a classpath issue after all. I run the Generate Artifact wizard, cross my fingers and...
Code:
java.lang.AbstractMethodError: acs.jdbc.g.supportsResultSetType(I)Z
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1485)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:36)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
So it seems that the acs.jdbc.Driver doesn't implement the MetaData methods that Hibernate needs to do its job...ah well.
I'm kinda suprised that the Sun jdbc-odbc bridge has problems interacting with Microsoft Access databases. I think the answer we're heading towards is: "don't use Access."
Still, my employer has a large installed base of Access applications. It would be nice to get them on the intranet with java so we can keep all the gui stuff, and without having to export them to some other db platform. I wonder: is shouldn't Hibernate play nice with MS Access?