ODK aggregate - HTTP Status 404 error

Hello,

I installed ODK 1.4.15 with Apache Tomcat 8.5.24 and MySQL 5.5.27 and Java jre1.8.0_151, after finishing instillation and doing the additional steps (creat DB user and new DB), i get the error " HTTP Status 404 – Not Found
Type Status Report
Message /ODKAggregate/
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
any idea on the reason of this error

Please see below logs from tomcat:

Jan 11, 2018 10:20:29 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hierarchicalRoleRelationships' defined in ServletContext resource [/WEB-INF/applicationContext-security.xml]: Invocation of init method failed; nested exception is org.opendatakit.common.persistence.exception.ODKDatastoreException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CREATE TABLE `odk_prod18`.`_granted_authority_hierarchy` ( `_URI` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATOR_URI_USER` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATION_DATE` DATETIME(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_LAST_UPDATE_DATE` DATETIME(6) NOT NULL , `DOMINATING_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `SUBORDINATE_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , INDEX(`_URI` )  USING HASH , INDEX(`_LAST_UPDATE_DATE` ) , INDEX(`DOMINATING_GRANTED_AUTHORITY` )  USING HASH  ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_L' at line 1
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.opendatakit.common.persistence.exception.ODKDatastoreException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CREATE TABLE `odk_prod18`.`_granted_authority_hierarchy` ( `_URI` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATOR_URI_USER` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATION_DATE` DATETIME(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_LAST_UPDATE_DATE` DATETIME(6) NOT NULL , `DOMINATING_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `SUBORDINATE_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , INDEX(`_URI` )  USING HASH , INDEX(`_LAST_UPDATE_DATE` ) , INDEX(`DOMINATING_GRANTED_AUTHORITY` )  USING HASH  ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_L' at line 1
	at org.opendatakit.common.persistence.engine.mysql.DatastoreImpl.assertRelation(DatastoreImpl.java:751)
	at org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.assertRelation(GrantedAuthorityHierarchyTable.java:115)
	at org.opendatakit.common.security.spring.GrantedAuthorityHierarchyTable.getEntireGrantedAuthorityHierarchy(GrantedAuthorityHierarchyTable.java:186)
	at org.opendatakit.common.security.spring.RoleHierarchyImpl.buildRolesReachableInOneStepMap(RoleHierarchyImpl.java:465)
	at org.opendatakit.common.security.spring.RoleHierarchyImpl.refreshReachableGrantedAuthorities(RoleHierarchyImpl.java:282)
	at org.opendatakit.common.security.spring.RoleHierarchyImpl.afterPropertiesSet(RoleHierarchyImpl.java:132)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
	... 25 more
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CREATE TABLE `odk_prod18`.`_granted_authority_hierarchy` ( `_URI` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATOR_URI_USER` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `_CREATION_DATE` DATETIME(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_LAST_UPDATE_DATE` DATETIME(6) NOT NULL , `DOMINATING_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , `SUBORDINATE_GRANTED_AUTHORITY` VARCHAR(80) CHARACTER SET utf8 NOT NULL , INDEX(`_URI` )  USING HASH , INDEX(`_LAST_UPDATE_DATE` ) , INDEX(`DOMINATING_GRANTED_AUTHORITY` )  USING HASH  ) ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_L' at line 1
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:419)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:443)
	at org.opendatakit.common.persistence.engine.mysql.DatastoreImpl.assertRelation(DatastoreImpl.java:737)
	... 32 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL , `_LAST_UPDATE_URI_USER` VARCHAR(80) CHARACTER SET utf8 NULL , `_L' at line 1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2480)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2438)
	at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
	at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
	at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
	at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:435)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)
	... 34 more

Jan 11, 2018 10:20:29 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext

You are using MySQL 5.5, upgrade to 5.7. Aggregate requires MySQL 5.7 or greater (or MariaDB 10.1 or greater).

1 Like

A post was split to a new topic: Upgrading to Java 8 runtime