繁体   English   中英

Liferay SQLSyntaxErrorException

[英]Liferay SQLSyntaxErrorException

安装 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/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. 相反,在同一个文件夹中,将mysql-connector-java-5.1.xx-bin.jar放在您在第 1 步下载的 ZIP 中
  4. 停止Tomcat
  5. 删除 MySQL 数据库并重新创建它(在 MySQL 控制台中: drop database lportal;然后create database lportal character set utf8; )。
  6. 启动Tomcat
  7. 现在它应该可以工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM