[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1175?page=c...
]
Sergio Montesa commented on HBX-1175:
-------------------------------------
I try again with latest nightly builds hibernatetools-3.4.0.v20110206-0140-H27-CR2 and the
result is the same. This is the output of Eclipse Exception Stack Trace:
org.hibernate.exception.SQLGrammarException: Could not get list of suggested identity
strategies from database. Probably a JDBC driver problem.
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at
org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect.getSuggestedPrimaryKeyStrategyName(MySQLMetaDataDialect.java:55)
at org.hibernate.cfg.reveng.JDBCReader.processPrimaryKey(JDBCReader.java:429)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:86)
at
org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:117)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
at
org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:106)
at
org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:63)
at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at
org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near '-siiu like 'aux_asignatura_plan'' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2273)
at
org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect.getSuggestedPrimaryKeyStrategyName(MySQLMetaDataDialect.java:30)
... 10 more
I think the error could be in the method "getSuggestedPrimaryKeyStrategyName"
HibernateTool hbm2java not working with MySQL database with dash
----------------------------------------------------------------
Key: HBX-1175
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1175
Project: Hibernate Tools
Issue Type: Bug
Affects Versions: 3.2.4 Beta1
Environment: Eclipse 3.6, hibernate 3.6, mysql 5.0
Reporter: Sergio Montesa
I have a MySQL database with a dash, such as db-info. I have an ant task:
<target name="reveng.entities.siiu">
<hibernatetool destdir="${src-server.dir}">
<jdbcconfiguration
packagename="${model.packagename.siiu}"
configurationfile="${env.JAVALAMBRE_HOME}/3rdparty/hibernate.cfg/${hibernate.cfg.file.siiu}"
revengfile="${hibernate.reveng.file.siiu}"/>
<hbm2java jdk5="true" ejb3="true"/>
</hibernatetool>
</target>
that generates an JDBC Driver Error
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira