我目前正在尝试在 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 Driver JAR 已正确复制/opt/tomcat/lib
,并且 DB 用户和凭据已正确设置在/opt/tomcat/sakai/local.properties
我不想在没有运行测试的情况下部署 Sakai,因为这是一个全新的安装,不应该有任何错误......
有什么帮助吗?