0

I am currently trying to deploy an instance of the latest Sakai 12.1 on Tomcat, but when I run the

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:

...
[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. 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? Isn't supposed to be only 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

I do not want to deploy Sakai without running test as this is a complete fresh installation and there should not be any errors...

Any help?

andcl
  • 3,342
  • 7
  • 33
  • 61
  • The deploy is failing and incomplete so the startup is failing. You need to do what it suggests and look at the /home/usuario/sakai/kernel/kernel-impl/target/surefire-reports to see why which test has failed. HSQLDB may be used for the unit tests but shouldn't come up in the startup logs. It seems like you're moving on to the startup step without fully having successfully deployed. – jonespm May 18 '18 at 13:49

1 Answers1

0

Look in your sakai.properties or local.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. 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

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

I'm wrong and it must be something else.

reinierpost
  • 8,425
  • 1
  • 38
  • 70