404 after installation

I need to setup ODK Aggregate for testing purposes with another tool locally. I followed the steps described here: https://docs.opendatakit.org/aggregate-tomcat But when navigation to http://localhost:8080/ODKAggregate I get a 404 error.

Tomcat Version 9.0.14

ODK Aggregate v1.7.1

Mysql Server v5.7.23

OS Mac OS Mojave

From the apache log

WARNING: Failure: _granted_authority_hierarchy exception: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
Dez. 14, 2018 3:46:02 NACHM. org.opendatakit.common.security.spring.RoleHierarchyImpl refreshReachableGrantedAuthorities
WARNING: Datastore failure: refreshReachableGrantedAuthorities -- adjusting retry time
Dez. 14, 2018 3:46:02 NACHM. org.springframework.context.support.AbstractApplicationContext refresh
WARNING: Exception encountered during context initialization - cancelling refresh attempt: 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.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure

Thanks for your help. If any additional information is needed just tell me.

Hi,

Not sure about Tomcat 9 but try with Tomcat 7, I believe it will work. And make sure to set up all the necessary environmental variables correctly.

Thanks,
Imran

@sparclex That error messages suggests that you don't have the MySQL Connector installed. Did you install it?

@yanokwa Thanks for your reply.

I downloaded the J Connector from here: https://dev.mysql.com/downloads/connector/j/ and placed it in /Library/Tomcat/lib. But it somehow even after restart does not recognize the driver.

I would be surprised if /Library/Tomcat/lib is the right path. How did you determine that? My guess would be /Library/Java/Extensions/ or $TOMCAT_HOME/lib.

If you are looking for a quick and easy way to install Aggregate to try things out, the VM (https://docs.opendatakit.org/aggregate-vm/) is a pretty good solution.

I found this solution on various tomcat sites. The $TOMCAT_HOME env var is not set, but I guess it should resolve to /Library/Tomcat for me. I also put the connector in /Library/Java/Extensions/ as well, but still does not work.

Thanks for the suggestion I will check this out.

There is a lot here that depends on your local machine. One good option is to get ride of the existing Tomcat install and instead use brew. Then it'll match a pretty common setup (and match me) and I'd be able to provide more guidance!