gpt4 book ai didi

maven - Sakai 12.1通过JDBC驱动连接MySQL时部署命令报错

转载 作者:行者123 更新时间:2023-11-28 23:15:26 24 4
gpt4 key购买 nike

我目前正在尝试在 Tomcat 上部署最新的 Sakai 12.1 实例,但是当我运行

mvn clean install sakai:deploy -Dmaven.tomcat.home=$CATALINA_HOME -Dsakai.home=$CATALINA_HOME/sakai -Dsakai.cleanup=true -Djava.net.preferIPv4Stack=true 命令,如果在“Sakai Core Kernel Implementation”模块(超出 413)之前执行没有错误,则返回:

...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:30 min
[INFO] Finished at: 2018-05-17T13:33:19+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project sakai-kernel-impl: There are test failures.
[ERROR]
[ERROR] Please refer to /home/usuario/sakai/kernel/kernel-impl/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :sakai-kernel-impl

我看过错误日志,第一个是在 RoleAccessTest 测试中。日志信息:

...
13:29:15,161 INFO PoolBase:505 - sakai - Driver does not support get/set network timeout for connections. (not supported feature)
13:29:15,168 ERROR PoolBase:441 - sakai - Failed to execute connection test query (insufficient user privileges or object not found: DUAL).
13:29:15,169 ERROR HikariPool:541 - sakai - Exception during pool initialization.
java.sql.SQLSyntaxErrorException: insufficient user privileges or object not found: DUAL
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
...

[编辑:查看前面的日志,为什么 HSQLDB 出现在错误堆栈中?不应该只有 MySQL 吗?]稍后,在另一行中:

WARN JdbcServicesImpl:195 - HHH000341: Could not obtain connection metadata 

Mysql 驱动程序 JAR 已正确复制到 /opt/tomcat/lib,DB 用户和凭据已正确设置到 /opt/tomcat/sakai/local.properties

我不想在没有运行测试的情况下部署 Sakai,因为这是一个全新的安装,不应该有任何错误...

有什么帮助吗?

最佳答案

查看您的 sakai.propertieslocal.properties。它可能有这条线

# validationQuery@javax.sql.BaseDataSource=select 1 from DUAL

这是 Sakai 默认发出的 SQL 查询,用于检查数据库是否可达。看起来您正在使用的数据库系统似乎不支持该查询,因此您需要将该属性设置为其他查询,或者切换您正在使用的数据库系统。 MySQL 支持这个查询,所以如果你有

vendor@org.sakaiproject.db.api.SqlService=mysql

我错了,一定是别的原因。

关于maven - Sakai 12.1通过JDBC驱动连接MySQL时部署命令报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50390905/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com