Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1191

Wrong Hibernate dialect for MySQL 5.1 causes issues; need better documentation

    XMLWordPrintable

Details

    Description

      useage of source:

      <mode:source jcr:name="sourceRepo"
      mode:classname="org.modeshape.connector.store.jpa.JpaSource"
      mode:description="The database store for our content"
      mode:dataSourceJndiName="jdbc/mode"
      mode:defaultWorkspaceName="default"
      mode:dialect="org.hibernate.dialect.MySQLInnoDBDialect"
      mode:autoGenerateSchema="create">

      partially fails according to logs:

      ...
      [#|2011-06-07T12:18:45.863+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - taSourceConnectionProvider - Using provided datasource|#]
      [#|2011-06-07T12:18:45.863+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - SettingsFactory - RDBMS: MySQL, version: 5.1.50|#]
      [#|2011-06-07T12:18:45.863+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.15 ( Revision: ${bzr.revision-id} )|#]
      [#|2011-06-07T12:18:45.863+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - Dialect - Using dialect: org.hibernate.dialect.MySQLInnoDBDialect|#]
      [#|2011-06-07T12:18:45.864+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - TransactionFactoryFactory - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory|#]
      [#|2011-06-07T12:18:45.864+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - actionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)|#]

      ...

      [#|2011-06-07T12:18:45.960+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - SchemaExport - Running hbm2ddl schema export|#]
      [#|2011-06-07T12:18:45.960+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|INFO - SchemaExport - exporting generated schema to database|#]
      [#|2011-06-07T12:18:47.298+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|ERROR - SchemaExport - Unsuccessful: create index NS_URI_INX on DNA_NAMESPACES (URI)|#]
      [#|2011-06-07T12:18:47.298+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|ERROR - SchemaExport - BLOB/TEXT column 'URI' used in key specification without a key length|#]
      [#|2011-06-07T12:18:47.534+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|ERROR - SchemaExport - Unsuccessful: create index CHILDNAME_INX on MODE_SIMPLE_NODE (WORKSPACE_ID, PARENT_ID, CHILD_NAME_NS_ID, CHILD_NAME_LOCAL, SNS_INDEX)|#]
      [#|2011-06-07T12:18:47.534+0200|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=54;_ThreadName=Thread-2;|ERROR - SchemaExport - BLOB/TEXT column 'CHILD_NAME_LOCAL' used in key specification without a key length|#]
      INFO - SchemaExport - schema export complete|#]
      ...

      this results in ERRORs in log and bad performance as necessary indexes are not created; The system however is running fine beside performance;

      NOTE: As noted below in the comments, the problem stems from improper configuration, and now involves improving our documentation with a direct link to the Hibernate dialects.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            kbachl K. Bachl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: