I've been trying to figure this out for a couple of days now, so decided to ask the community.
I'm trying to generate hibernate daos by reverse engineering the db using the eclipse 'Hibernate Console'. Below is my hibernate.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/fpr</property> <property name="hibernate.connection.username">admin</property> <property name="hibernate.connection.username">admin</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> </session-factory> </hibernate-configuration>
But every time I'm trying to expand the 'Database' view under the 'Hibernate Console' view, I get the following exception:
An internal error occurred during: "Fetching children of Database". java.lang.NoClassDefFoundError: java/sql/SQLFeatureNotSupportedException at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282) at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:40) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1929) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:91) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:57) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Does anybody know what this might be??? I have the mysql-connector jar in the classpath, so that's definitely not an issue (that's the only entry I have in the 'configuration' classpath field. From reading online, the ClassNotFoundExceptions are usually due to lack/or unnecessary entries in the classpath field.
Any help would be appreciated!
Thanks in advance, Vladimir
|