Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-967

orm error - Error during DDL export

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Labels:

      Description

      I'm getting a Error during DDL export error in the console after defining a many-to-many relationship. The code works correctly on ACF.

      ============
      Here are the components:
      ============

      // user.cfc
      component persistent="true"

      { property name="id" fieldtype="id" ormtype="integer" generator="native"; property name="username"; property name="groups" singularname="group" cfc="group" fieldtype="many-to-many" linkTable="user_groups" fkcolumn="userId" inversejoincolumn="groupId"; }

      //group.cfc
      component persistent="true"

      { property name="id" fieldtype="id" ormtype="integer" generator="native"; property name="name"; property name="users" cfc="user" fieldtype="many-to-many" linkTable="user_groups" fkcolumn="groupId" inversejoincolumn="userId"; }

      ============
      Here is the stacktrace:
      ============

      41605 [Finalizer] INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql://mysql.local:3306/test?useUnicode=true&characterEncoding=UTF-8
      Tue Sep 21 11:33:55 EDT 2010-940 Call:/orm/index.cfm (1)
      181857 [http-8080-exec-6] INFO org.hibernate.cfg.HbmBinder - Mapping class: group -> group
      181857 [http-8080-exec-6] INFO org.hibernate.cfg.HbmBinder - Mapping collection: group.users -> user_groups
      181857 [http-8080-exec-6] INFO org.hibernate.cfg.HbmBinder - Mapping class: user -> user
      181857 [http-8080-exec-6] INFO org.hibernate.cfg.HbmBinder - Mapping collection: user.groups -> user_groups
      181857 [http-8080-exec-6] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
      181858 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update
      181858 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata
      181858 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
      181858 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
      181858 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
      181858 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://mysql.local:3306/test?useUnicode=true&characterEncoding=UTF-8
      181858 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties:

      {user=root, password=****}
      181888 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - updating schema
      181889 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: group
      181889 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: user
      181890 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: user_groups
      181890 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: group
      181891 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: user
      181891 [http-8080-exec-6] INFO org.hibernate.tool.hbm2ddl.DatabaseMetadata - table not found: user_groups
      181892 [http-8080-exec-6] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not complete schema update
      org.hibernate.JDBCException: Error during DDL export
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:209)
      at railo.runtime.orm.hibernate.HibernateSessionFactory.schemaExport(HibernateSessionFactory.java:167)
      at railo.runtime.orm.hibernate.HibernateSessionFactory.createConfiguration(HibernateSessionFactory.java:146)
      at railo.runtime.orm.hibernate.HibernateORMEngine.getSessionFactory(HibernateORMEngine.java:220)
      at railo.runtime.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:91)
      at railo.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:2954)
      at railo.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:2942)
      at railo.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:45)
      at railo.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:502)
      at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:114)
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23)
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1900)
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:280)
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:281)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1568)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: com.mysql.jdbc.exceptions.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 'group (
      id integer not null auto_increment,
      name varchar(255),
      ' at line 1
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
      at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1350)
      at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1266)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)
      ... 29 more
      181893 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql://mysql.local:3306/test?useUnicode=true&characterEncoding=UTF-8
      org.hibernate.JDBCException: Error during DDL export
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:209)
      at railo.runtime.orm.hibernate.HibernateSessionFactory.schemaExport(HibernateSessionFactory.java:167)
      at railo.runtime.orm.hibernate.HibernateSessionFactory.createConfiguration(HibernateSessionFactory.java:146)
      at railo.runtime.orm.hibernate.HibernateORMEngine.getSessionFactory(HibernateORMEngine.java:220)
      at railo.runtime.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:91)
      at railo.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:2954)
      at railo.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:2942)
      at railo.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:45)
      at railo.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:502)
      at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:114)
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23)
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1900)
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:280)
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:281)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1568)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: com.mysql.jdbc.exceptions.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 'group (
      id integer not null auto_increment,
      name varchar(255),
      ' at line 1
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
      at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1350)
      at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1266)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)
      ... 29 more
      Tue Sep 21 11:33:56 EDT 2010-118 {HIBERNATE} - Error during DDL export
      181894 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
      181894 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
      181894 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
      181894 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://mysql.local:3306/test?useUnicode=true&characterEncoding=UTF-8
      181894 [http-8080-exec-6] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=root, password=****}

      181911 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.1.31-community
      181911 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.6 ( $Date: 2007-03-09 22:13:57 +0100 (Fri, 09 Mar 2007) $, $Revision: 6341 $ )
      181911 [http-8080-exec-6] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
      181911 [http-8080-exec-6] INFO org.hibernate.engine.jdbc.JdbcSupportLoader - Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
      181911 [http-8080-exec-6] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
      181911 [http-8080-exec-6] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      181912 [http-8080-exec-6] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: dynamic-map
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
      181912 [http-8080-exec-6] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
      181915 [http-8080-exec-6] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
      181919 [http-8080-exec-6] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
      Tue Sep 21 11:33:56 EDT 2010-176 Release: (1)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                webflint Brett S
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: