Errror running ContentBox Installer with MySQL 8 locally

I tried to use your installer (ContentBox Modular CMS), but I get the error:

Error in executing the DDL.

Specified key was too long; max key length is 1000 bytesOther Errors :

  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement
  • Error executing DDL via JDBC Statement

Resources:

  • Check the ColdFusion documentation to verify that you are using the correct syntax.
  • Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15

Remote Address 127.0.0.1
Referrer http://127.0.0.1:59464/
Date/Time 17-Feb-22 08:58 PM

Stack Trace

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement 
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) 
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:525) 
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:470) 
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyIndexes(AbstractSchemaMigrator.java:327) 
at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:84) 
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:203) 
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110) 
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:87) 
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:58) 
at coldfusion.orm.hibernate.HibernateConfiguration.exportSchema(HibernateConfiguration.java:453) 
at coldfusion.orm.hibernate.HibernateConfiguration.exportSchema(HibernateConfiguration.java:411) 
at coldfusion.orm.hibernate.HibernateProvider.initializeORMForApplication(HibernateProvider.java:173) 
at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:77) 
at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:819) 
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:433) 
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43) 
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) 
at coldfusion.filter.PathFilter.invoke(PathFilter.java:162) 
at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) 
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) 
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97) 
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) 
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) 
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60) 
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) 
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) 
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) 
at coldfusion.CfmServlet.service(CfmServlet.java:231) 
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) 
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) 
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) 
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46) 
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) 
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) 
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) 
at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47) 
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) 
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) 
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) 
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) 
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) 
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) 
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) 
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) 
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) 
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) 
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) 
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) 
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) 
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) 
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) 
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) 
at runwar.Server$1.handleRequest(Server.java:510) 
at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) 
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) 
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:280) 
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) 
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) 
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) 
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) 
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) 
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:260) 
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) 
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) 
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) 
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) 
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) 
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) 
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) 
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) 
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) 
at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.sql.SQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes 
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) 
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) 
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:762) 
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:646) 
at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:265) 
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54) … 71 more

My java version is java 17.0.1 2021-10-19 LTS

You forgot to tell us what DB you are using.

I am sorry I am using MySQL 8

That going to be a serious problem. Adobe CF and Lucee don’t even run on java 17. I have a feeling java 17 is not what CommandBox is actually using. You can’t simply open a terminal and type

java -version

and expect whatever shows up there to be the version of java any particular app on your PC is also using. but to be clear, I don’t really care what you’re using locally. Not yet anyway. I asked what version of java you had on hostek only because the error message seemed to indicate that may be an issue.

johnbarrett@Johns-MBP ~ % java -version
java version “17.0.1” 2021-10-19 LTS
Java™ SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot™ 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
johnbarrett@Johns-MBP ~ %

Here is the error you need to be focusing on for your local install. This is an error coming right from MySQL and @lmajano would need to comment if he’s seen it or not. You can google it for what it means.

Did you read what I said above?? I literally said you can’t do that and get a useful answer! I’m not clear why you would go do it again. If you want to get the Java home in use by a given CommandBox server, run

CommandBox>  server info property=javaHome

But AGAIN, this really doesn’t matter and I never asked what your Java version was on your local PC because the error you had there was unrelated.

when I run the command in box, I get that I am using java 11.0.12

@johnbarrett @lmajano This newly split thread is for setting up ContentBox CMS locally with MySQL 8 and the DDL error you’re getting.

Specified key was too long; max key length is 1000 bytes

Is this something that I can fix in one of the files?

Not sure what you mean. A DDL error means an error in the SQL being run on the DB. ContentBox uses Hibernate, which means all SQL is generated on-the-fly by Hibernate and then run on the DB. So if there’s an error i the SQL, it’s not like you can just to edit that SQL somewhere in a .cfm file.

I’d wait and see if Luis has run into this. Based on a quick Google of the error message, it appears to happen when you have too many columns in an index. So I’m guessing one of the tables contenbox uses declares an index which has enough columns that it is causing this error on certain versions of MySQL.

Yes we have seen this issue before, but usually the default for MySQL 8 is 3072 bytes. So I am confused since I test on MySQL 8 and do not get this error.

@lmajano Can you share the name of the setting in MySQL in question? Then we can determine of @johnbarrett has adjusted his default configuration of MySQL to one that is invalid.

@johnbarrett I don’t see which CFML Engine you chose?

I am using ColdFusion 2021

Ok, I see that all of our automated tests are not running for ACF2021. So I will test manually locally as well and report back. I will also activate them in github actions.

thanks so very much for all your help. I really appreciate it very much

You got it! I am also tagging @Abilio how will be doing manual setup tests as well.

Ok @johnbarrett I have activated automated setup and testing for ACF2021 and everything is passing and building. You can see it here: https://github.com/Ortus-Solutions/ContentBox/actions/runs/1861502669

So this leads me to the path that maybe the contentbox-installer has an issue with MySQL 8 + ACF2021. That’s my next target. We will report back soon.