-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
2016-08-11 16:03:34,772 ERROR [org.ametys.core.script.SqlTablesInit] (http-nio-8080-exec-4;/_admin/plugins/admin/config/set) Unable to run the SQL script for file at location: plugin:newsletter://scripts/mysql/newsletter.sql. All pendings script executions are aborted. java.sql.SQLException: Unable to execute SQL: 'CREATE TABLE Newsletter_Subscribers( Email VARCHAR(255) not null, Site_Name VARCHAR(48) NOT NULL, Category VARCHAR(64) NOT NULL, Subscribed_At datetime not null, Token VARCHAR(64) NOT NULL, PRIMARY KEY(Email, Site_Name, Category) )ENGINE=innodb' at line 25 at org.ametys.core.script.ScriptRunner._execute(ScriptRunner.java:234) at org.ametys.core.script.ScriptRunner._processCommand(ScriptRunner.java:213) at org.ametys.core.script.ScriptRunner.runScript(ScriptRunner.java:102) at org.ametys.core.script.SqlTablesInit.initTables(SqlTablesInit.java:191) at org.ametys.core.script.SqlTablesInit.init(SqlTablesInit.java:130) at org.ametys.runtime.servlet.RuntimeServlet._initPlugins(RuntimeServlet.java:368) at org.ametys.runtime.servlet.RuntimeServlet._initAmetys(RuntimeServlet.java:306) at org.ametys.runtime.servlet.RuntimeServlet.restartCocoon(RuntimeServlet.java:620) at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:583) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Index column size too large. The maximum column size is 767 bytes. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2541) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2499) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:844) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:748) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.ametys.core.script.ScriptRunner._execute(ScriptRunner.java:225) ... 30 more
I had the same problem when creating others tables, I had to do :
#as root
vi /etc/mysql/mariadb.conf.d/50-server.cnf
#add in [mysqld] basic
innodb_large_prefix=on
default_storage_engine = innodb
innodb_file_per_table=true
innodb_file_format = Barracuda
And then in every request I added just after ENGINE=innodb
ROW_FORMAT=COMPRESSED;
But here there is too much...
- duplicates
-
RUNTIME-2869 Change all mysql scripts of all plugins to UTF8MB4 encoding
- Open