我正在运行 Ubuntu 服务器:
# uname -a
Linux host-38sigregt 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
在其嵌入的 Tomcat 8.5.32 实例上使用 DotCMS 5.0.3,配置为命中 PostgreSQL 10.6 的本地实例:
# psql --version
psql (PostgreSQL) 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
它运行在 OpenJDK 8 上。
我按照此处的安装步骤进行操作:
https://dotcms.com/docs/latest/installing-from-release
但所有 Web 请求在客户端都默默失败,而在服务器端,日志中充斥着如下消息:
13:47:56.025 WARN cache.LegacyContentTypeCacheImpl - Structure with inode: 'host' not found in db
13:47:56.027 WARN web.HostWebAPIImpl - Content Index is fouled up, need to try db: Failed to execute phase [query], all shards failed; shardFailures {[jW
PklQWCTuWnXaHsidwH1w][working_20190308122136][0]: RemoteTransportException[[a2e07940-4a77-4937-9e50-470504ff25e9][127.0.0.1:9300][indices:data/read/search[
phase/query]]]; nested: QueryShardException[No mapping found for [moddate] in order to sort on]; }
13:47:56.029 ERROR business.HostAPIImpl - Content Type with id:'Host' not found
com.dotcms.contenttype.exception.NotFoundInDbException: Content Type with id:'Host' not found
13:47:56.029 ERROR filters.ThreadNameFilter - Unable to retrieve current request host for URI /
13:47:56.030 ERROR filters.CookiesFilter - Exception processing Cookies
javax.servlet.ServletException: Content Type with id:'Host' not found
我曾尝试研究过这个问题,但无功而返。我交叉发布到 DotCMS Github 页面。
答案1
因此,可能的原因是 DotCMS 需要 Java 8,而我一直在运行 OpenJDK 10,这导致了许多与持久性相关的NoClassDefFound
错误,尤其是与激活库相关的错误。清除 10 并安装 8,清除整个数据库和 DotCMS 实例并重新启动,结果实例成功。