Liferay SQLSyntaxErrorException

问题描述 投票:2回答:1

安装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)
mysql liferay mysql-connector liferay-7
1个回答
2
投票

问题是你的MySQL / J连接器太新了,Liferay还不兼容它。

  1. https://dev.mysql.com/downloads/connector/j/5.1.html下载ZIP文件并解压缩。
  2. 转到Liferay服务器的liferay/tomcat-xxxxx/lib/ext文件夹并删除你在里面找到的任何mysql-connector-xxxxxxxxx.jar
  3. 相反,在同一文件夹中,放置可在步骤1中下载的ZIP中找到的mysql-connector-java-5.1.xx-bin.jar
  4. 停止Tomcat
  5. 删除MySQL数据库并重新创建它(在MySQL控制台:drop database lportal;然后create database lportal character set utf8;)。
  6. 启动Tomcat
  7. 现在它应该工作。
© www.soinside.com 2019 - 2024. All rights reserved.