当通过JBDC驱动程序连接到MySQL时,Sakai 12.1部署命令错误

时间:2018-05-17 11:58:29

标签: maven tomcat sakai

我目前正在尝试在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核心内核实现”模块(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 

/opt/tomcat/lib中正确复制了Mysql驱动程序JAR,并在/opt/tomcat/sakai/local.properties

中正确设置了数据库用户和凭据

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

任何帮助?

1 个答案:

答案 0 :(得分:0)

查看sakai.propertieslocal.properties。它可能有一行

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

这是SQL查询Sakai默认情况下检查数据库是否可访问。看起来您使用的数据库系统并不支持该查询,因此您需要将该属性设置为其他查询,或者切换您正在使用的数据库系统。 MySQL支持此查询,因此如果您有

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

我错了,一定是别的。