Liferay SQLSyntaxErrorException - PullRequest
       14

Liferay SQLSyntaxErrorException

2 голосов
/ 01 апреля 2019

После установки Liferay 7.0 и выбора базы данных MySQL я получаю эту ошибку:

Starting Liferay DXP Digital Enterprise 7.0.10 GA1 (Wilberforce / Build 7010 / June 15, 2016)

05:39:54,652 INFO  [localhost-startStop-1][StartupAction:121] The following patches are installed: de-32-7010
05:39:54,743 WARN  [localhost-startStop-1][ReleaseLocalServiceImpl:229] Table 'lportal.Release_' doesn't exist
05:39:54,745 INFO  [localhost-startStop-1][ReleaseLocalServiceImpl:126] Create tables and populate with default data
05:45:25,609 INFO  [localhost-startStop-1][BaseDB:502] Database does not support case sensitive queries
05:45:25,807 INFO  [localhost-startStop-1][UpgradeProcess:84] Upgrading com.liferay.portal.security.audit.storage.internal.upgrade.AuditStorageServiceUpgrade$1
05:45:25,809 INFO  [localhost-startStop-1][UpgradeProcess:99] Completed upgrade process com.liferay.portal.security.audit.storage.internal.upgrade.AuditStorageServiceUpgrade$1 in 2ms
05:45:37,082 INFO  [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProcessSuite
05:45:37,084 INFO  [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProperties
05:45:37,085 INFO  [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifySystemProperties
05:45:37,085 INFO  [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifySystemProperties in 0 ms
05:45:37,085 INFO  [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifyPortalProperties
05:45:37,102 INFO  [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifyPortalProperties in 17 ms
05:45:37,102 INFO  [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyProperties#verifyDocumentLibrary
05:45:37,102 INFO  [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyProperties#verifyDocumentLibrary in 0 ms
05:45:37,102 INFO  [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyProperties in 18ms
05:45:37,103 INFO  [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyDB2
05:45:37,103 INFO  [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyDB2 in 0ms
05:45:37,104 INFO  [localhost-startStop-1][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyMySQL
05:45:37,104 INFO  [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyMySQL#verifyTableEngine
05:45:37,265 INFO  [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyMySQL#verifyTableEngine in 161 ms
05:45:37,266 INFO  [localhost-startStop-1][LoggingTimer:70] Starting com.liferay.portal.verify.VerifyMySQL#verifyDatetimePrecision
05:45:56,727 INFO  [localhost-startStop-1][LoggingTimer:38] Completed com.liferay.portal.verify.VerifyMySQL#verifyDatetimePrecision in 19461 ms
05:45:56,728 INFO  [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyMySQL in 19624ms
05:45:56,728 INFO  [localhost-startStop-1][VerifyProcess:80] Completed verification process com.liferay.portal.verify.VerifyProcessSuite in 19646ms
05:45:56,861 ERROR [localhost-startStop-1][DBUpgrader:253] Unable to execute verify process: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'lportal.columns_priv' doesn't exist
com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: java.sql.SQLSyntaxErrorException: Table 'lportal.columns_priv' doesn't exist
        at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:74)
        at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:113)
        at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:78)
        at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:47)
        at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:175)
        at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:87)
        at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:247)
        at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:243)
        at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
        at com.liferay.portal.events.StartupAction.run(StartupAction.java:85)
        at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1341)
        at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:272)
        at javax.servlet.GenericServlet.init(GenericServlet.java:158)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

1 Ответ

2 голосов
/ 01 апреля 2019

Проблема в том, что ваш MySQL / J-коннектор слишком свежий , Liferay еще не совместим с ним.

  1. Загрузите ZIP-файл по адресу https://dev.mysql.com/downloads/connector/j/5.1.html и распакуйте его.
  2. Перейдите в папку liferay/tomcat-xxxxx/lib/ext вашего сервера Liferay и удалите все файлы mysql-connector-xxxxxxxxx.jar, которые вы найдете внутри
  3. Вместо этого, в той же папке, поместите mysql-connector-java-5.1.xx-bin.jar, который можно найти внутри ZIP, который вы скачали на шаге 1
  4. Стоп Tomcat
  5. Удалить базу данных MySQL и воссоздать ее (в консоли MySQL: drop database lportal;, затем create database lportal character set utf8;).
  6. Запустить Tomcat
  7. Теперь это должно работать.
...