Joined: Tue Nov 15, 2005 12:25 pm Posts: 15
|
Hi Max.
I am executing hbm2hbmxml with reverse engineeering option and custom metadatadialect which reads pseudo metadata from external xml file. It works fine except one case when database doesn't exists.
Can you prevent calling of SettingsFactory in case like mine when custom meta dialect used.
This is execption I am getting :
ReverseEngineeringNoDB:
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
[hibernatetool] 16 [Thread-41] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
[hibernatetool] java.sql.SQLException: Syntax error or access violation, message from server: "Unknown database 'hibernate'"
[hibernatetool] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876)
[hibernatetool] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1803)
[hibernatetool] at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2353)
[hibernatetool] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:750)
[hibernatetool] at com.mysql.jdbc.Connection.createNewIO(Connection.java:1627)
[hibernatetool] at com.mysql.jdbc.Connection.<init>(Connection.java:427)
[hibernatetool] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:395)
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:512)
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[hibernatetool] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[hibernatetool] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
[hibernatetool] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1855)
[hibernatetool] at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:38)
[hibernatetool] at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:76)
[hibernatetool] at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:226)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:242)
[hibernatetool] at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
[hibernatetool] at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
[hibernatetool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatetool] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatetool] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatetool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatetool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatetool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatetool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatetool] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatetool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatetool] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:704)
[hibernatetool] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:455)
[hibernatetool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatetool] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[hibernatetool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[hibernatetool] at java.lang.reflect.Method.invoke(Method.java:324)
[hibernatetool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:356)
[hibernatetool] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:215)
[hibernatetool] at java.lang.Thread.run(Thread.java:534)
[hibernatetool] Hibernate xml C:\eclipse\workspace\HibernateReview/hibernate/schema/cs-schema.xml
[hibernatetool] Database type mysql
[hibernatetool] Database name hibernate
[hibernatetool] Database user root
|
|