Message Boards

Database errors with LR7CE and MySQL 5.7.17

Peter Helgren, modified 7 Years ago.

Database errors with LR7CE and MySQL 5.7.17

Regular Member Posts: 124 Join Date: 11/14/13 Recent Posts
Environment is as follows:
CentOS 7 4GB RAM
MySQL Server version: 5.7.17 MySQL Community Server (GPL)
Liferay 7.0-ga3
Java: openjdk version "1.8.0_121"

Clean install of Tomcat bundle. Brand new VM, brand new LR install, new install of MySQL, basically a pristine environment. LR7CE startup was fine. Took the option to switch to MySQL. Filled in the requirements and saved them. Restarted LR. This is what I see in catalina.out just beyond the nice, fancy Liferay text logo:
GNU nano 2.3.1 File: /opt/Liferay/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/logs/catalina.out

Starting Liferay Community Edition Portal 7.0.2 GA3 (Wilberforce / Build 7002 / August 5, 2016)

21:05:41,143 INFO [localhost-startStop-1][StartupAction:118] There are no patches installed
21:05:41,386 INFO [localhost-startStop-1][BaseDB:501] Database does not support case sensitive queries
21:05:43,433 INFO [localhost-startStop-1][PluginPackageUtil:1003] Reading plugin package for the root context
21:05:44,467 INFO [localhost-startStop-1][AutoDeployDir:185] Auto deploy scanner started for /opt/Liferay/liferay-ce-portal-7.0-ga3/deploy
21:05:48,729 ERROR [PersistedQuartzSchedulerEngineInstance_QuartzSchedulerThread][ErrorLogger:2361] An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: 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 'OPTION SQL_SELECT_LIMIT=1' at line 1 [See nested exception: 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 'OPTION SQL_SELECT_LIMIT=1' at line 1]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2827)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2755)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2751)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
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 'OPTION SQL_SELECT_LIMIT=1' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1447)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2571)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778)
... 4 more
21:05:48,755 ERROR [QuartzScheduler_PersistedQuartzSchedulerEngineInstance-NON_CLUSTERED_MisfireHandler][PortalJobStore:3939] MisfireHandler: Error handling misfires: Database error recovering from misfires.
org.quartz.JobPersistenceException: Database error recovering from misfires. [See nested exception: 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3184)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3934)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3955)
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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1439)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.countMisfiredTriggersInState(StdJDBCDelegate.java:416)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3163)
... 2 more
21:05:48,939 ERROR [localhost-startStop-1][JDBCExceptionReporter:234] 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
21:05:48,942 WARN [localhost-startStop-1][PortalInstanceLifecycleListenerManagerImpl:111] Unable to register portal instance {mvccVersion=1, companyId=20116, accountId=20118, webId=liferay.com, key=oqBfziGS/xKmTJhsmIQPdA==, mx=liferay.com, homeURL=, logoId=0, system=false, maxUsers=0, active=true}
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:267)
at com.liferay.portlet.expando.service.persistence.impl.ExpandoTablePersistenceImpl.fetchByC_C_N(ExpandoTablePersistenceImpl.java:801)
at com.liferay.portlet.expando.service.persistence.impl.ExpandoTablePersistenceImpl.fetchByC_C_N(ExpandoTablePersistenceImpl.java:700)
at com.liferay.portlet.expando.service.impl.ExpandoTableLocalServiceImpl.fetchTable(ExpandoTableLocalServiceImpl.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:46)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
at com.sun.proxy.$Proxy94.fetchTable(Unknown Source)
at com.liferay.portal.security.sso.google.internal.instance.lifecycle.AddGoogleExpandoColumnsPortalInstanceLifecycleListener.portalInstanceRegistered(AddGoogleExpandoColumnsPortalInstanceLifecycleListener.java:52)
at com.liferay.portal.instance.lifecycle.internal.PortalInstanceLifecycleListenerManagerImpl.registerCompany(PortalInstanceLifecycleListenerManagerImpl.java:107)
at com.liferay.portal.instance.lifecycle.internal.PortalInstanceLifecycleListenerManagerImpl.addPortalInstanceLifecycleListener(PortalInstanceLifecycleListenerManagerImpl.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...............................................

Basically the log is full of these errors of various kinds. I did create the lportal DB with the UTF-8 option and ALL the tables have been created but I cannot discern what the issue is. Should I just drop all the tables and restart the wizard (however that should be done) or did a miss a setting somewhere?

APRIL 7th UPDATE:

Dropped the database, recreated it, restarted Liferay with the setup wizard enabled. Got to the "Basic Configuration" step. Clicked on the finish button and then received:
An unexpected system error occurred.

javax.servlet.jsp.JspException: com.liferay.portal.kernel.template.TemplateException: Unable to process template classic-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl

catalina.out still shows many database errors as listed above. I might step *back* a version of MySQL, to 5.6.xx and see if that makes any difference. I'd use Hypersonic but I need to move beyond the "kick the tires" phase and get this site going. We are migrating from 6.0 and this fresh install is our first step in rebuilding in LR 7 CE.

So something is amiss. Can anyone weigh in here?
thumbnail
David H Nebinger, modified 7 Years ago.

RE: Database errors with LR7CE and MySQL 5.7.17 (Answer)

Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
If you drop the database, also purge the osgi/state directory and the data/document-library folder.

Update the JDBC driver for mysql, replace the version in lib/ext w/ the right one for your version of MySQL.










Come meet me at the 2017 LSNA!
Peter Helgren, modified 7 Years ago.

RE: Database errors with LR7CE and MySQL 5.7.17

Regular Member Posts: 124 Join Date: 11/14/13 Recent Posts
We were on the same page....I searched on the error 'OPTION SQL_SELECT_LIMIT=DEFAULT' and saw a few references about the jdbc driver being out of date or incorrect and yet I could have sworn that I had downloaded the latest and greatest. I had not! Somehow I had gotten the 5.0.8 version. I have no idea how...So I downloaded the 5.1.14 and all is well.

Thanks