简体   繁体   English

通过JBDC驱动程序连接到MySQL时Sakai 12.1 deploy命令错误

[英]Sakai 12.1 deploy command error when connecting to MySQL through JBDC driver

I am currently trying to deploy an instance of the latest Sakai 12.1 on Tomcat, but when I run the 我目前正在尝试在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 command, if executes without errors until the "Sakai Core Kernel Implementation" modules (out of the 413), returning this: 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”之前没有错误实现”模块(在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

I have seen the error log and the first one is in the RoleAccessTest test. 我已经看到了错误日志,第一个是在RoleAccessTest测试中。 The log info: 日志信息:

...
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)
        ...

[ EDIT: Looking at the preceding log, why does HSQLDB arises in the error stack? [ 编辑:查看前面的日志,为什么在错误堆栈中出现HSQLDB? Isn't supposed to be only MySQL? 不应该仅仅是MySQL吗? ] Later, in another line: ]稍后,在另一行中:

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

The Mysql Driver JAR is correctly copied in /opt/tomcat/lib , and the DB user and credentials correctly set in /opt/tomcat/sakai/local.properties Mysql驱动程序JAR已正确复制到/opt/tomcat/lib ,并且数据库用户和凭据已正确设置在/opt/tomcat/sakai/local.properties

I do not want to deploy Sakai without running test as this is a complete fresh installation and there should not be any errors... 我不想在没有运行测试的情况下部署Sakai,因为这是一个完整的全新安装,应该没有任何错误...

Any help? 有什么帮助吗?

Look in your sakai.properties or local.properties . 查看您的sakai.propertieslocal.properties It probably has the line 它可能有线

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

This is the SQL query Sakai issues by default to check whether the database is reachable. 默认情况下,这是SQL查询Sakai问题,用于检查数据库是否可访问。 It looks as though the database system you're using doesn't support that query, so you'll either need to set that property to some other query, or switch the database system you're using. 您正在使用的数据库系统似乎不支持该查询,因此您需要将该属性设置为其他查询,或者切换您正在使用的数据库系统。 MySQL supports this query, so if you have MySQL支持此查询,因此如果您有

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

I'm wrong and it must be something else. 我错了,一定是别的东西。

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

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