-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Sql Exception
PostPosted: Fri Apr 28, 2006 2:17 pm 
Newbie

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 5:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is just a warning - not an error.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.